patch: run tests when pushed to master branch (#3) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test" | |
# Only execute this workflow when a PR is opened or when something is pushed to the master branch | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
test: | |
# Set up OS | |
runs-on: ubuntu-latest | |
environment: "Gradle Plugin Test" | |
steps: | |
# Checkout code | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Setup java and maven | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
cache: 'gradle' | |
# Setup executable gradle | |
- name: Make Gradle executable | |
run: chmod +x gradlew | |
# Test plugin | |
- name: Test Plugin | |
env: | |
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }} | |
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
run: ./gradlew check --no-daemon |