name: "Branch build" on: push: branches-ignore: - main - develop - release/* permissions: contents: read jobs: install-notest: if: "github.repository != 'WebGoat/WebGoat'" runs-on: ubuntu-latest name: "Package and linting" steps: - uses: actions/checkout@v3 - name: set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'temurin' java-version: 17 architecture: x64 - name: Cache Maven packages uses: actions/cache@v3 with: path: ~/.m2 key: ubuntu-latest-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ubuntu-latest-m2 - name: Test with Maven run: mvn --no-transfer-progress install -DskipTests testing: if: "github.repository != 'WebGoat/WebGoat'" needs: install-notest runs-on: ubuntu-latest strategy: matrix: args: - mvn --no-transfer-progress -pl '!webgoat-integration-tests' test - mvn --no-transfer-progress -pl webgoat-integration-tests test steps: - uses: actions/checkout@v3 - name: set up JDK 17 uses: actions/setup-java@v2 with: distribution: 'temurin' java-version: 17 architecture: x64 - name: Cache Maven packages uses: actions/cache@v3 with: path: ~/.m2 key: ubuntu-latest-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ubuntu-latest-m2 - name: Test with Maven run: ${{ matrix.args }}