diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a68efd3c..d30c8c58d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,12 +46,12 @@ jobs: run: mvn clean install notify-slack: - if: github.event_name == 'push' && (success() || failure()) + if: github.repository == 'WebGoat/WebGoat' && github.event_name == 'push' && (success() || failure()) needs: - build runs-on: ubuntu-latest steps: - - name: "Slack workflow notification" + - name: "Slack workflow notification fork test" uses: Gamesight/slack-workflow-status@master with: repo_token: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/quality_checks.yml b/.github/workflows/quality_checks.yml new file mode 100644 index 000000000..7e68e6000 --- /dev/null +++ b/.github/workflows/quality_checks.yml @@ -0,0 +1,52 @@ +name: "Testing and linting" +on: + push: + branches-ignore: + - master + - develop + - release/* +jobs: + install-notest: + runs-on: ubuntu-latest + name: "Package and linting" + steps: + - uses: actions/checkout@v2 + - name: set up JDK 15 + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: 15 + architecture: x64 + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ubuntu-latest-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ubuntu-latest-m2 + - name: Test with Maven + run: mvn clean install -DskipTests + + testing: + needs: install-notest + runs-on: ubuntu-latest + strategy: + matrix: + args: + - mvn -pl '!webgoat-integration-tests' test + - mvn -pl webgoat-integration-tests test + steps: + - uses: actions/checkout@v2 + - name: set up JDK 15 + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: 15 + architecture: x64 + - name: Cache Maven packages + uses: actions/cache@v2.1.5 + with: + path: ~/.m2 + key: ubuntu-latest-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ubuntu-latest-m2 + - name: Test with Maven + run: ${{ matrix.args }} diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index e1012a97a..5889c17c4 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -5,7 +5,7 @@ on: jobs: rebase: name: Rebase - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER' + if: github.repository == 'WebGoat/WebGoat' && github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') && github.event.comment.author_association == 'MEMBER' runs-on: ubuntu-latest steps: - name: Checkout the latest code diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 667b56645..e48bc8500 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,7 @@ on: - v* jobs: release: + if: github.repository == 'WebGoat/WebGoat' name: Release WebGoat runs-on: ubuntu-latest environment: @@ -103,6 +104,7 @@ jobs: - name: "Image digest" run: echo ${{ steps.docker_build.outputs.digest }} new_version: + if: github.repository == 'WebGoat/WebGoat' name: Update development version needs: [ release ] runs-on: ubuntu-latest diff --git a/.github/workflows/welcome.yml b/.github/workflows/welcome.yml index 9ad343f08..24c2a27b9 100644 --- a/.github/workflows/welcome.yml +++ b/.github/workflows/welcome.yml @@ -7,6 +7,7 @@ on: jobs: greeting: + if: github.repository == 'WebGoat/WebGoat' runs-on: ubuntu-latest steps: - uses: actions/first-interaction@v1.1.0 diff --git a/pom.xml b/pom.xml index 4a337bdda..900d9dbab 100644 --- a/pom.xml +++ b/pom.xml @@ -110,11 +110,6 @@ https://github.com/WebGoat/WebGoat/issues - - Travis CI - https://travis-ci.org/WebGoat/WebGoat - - UTF-8