Skip to content

Commit

Permalink
chore: Add condition to run only unit test when branch is not master
Browse files Browse the repository at this point in the history
  • Loading branch information
talyssoncastro committed Dec 28, 2023
1 parent 48f0ac9 commit 47e8c92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ jobs:
- name: Print Version
run: echo "Version ${{ steps.set-version.outputs.version }}"

- name: Set test suite
if: ${{ github.ref != 'refs/heads/master' }}
run: echo "GITHUB_TEST_SUITE=UnitTestSuite" >> $GITHUB_ENV

- name: Compile
run: ./mvnw compile

- name: Verify
run: ./mvnw --batch-mode verify -Danypoint.client.id=${{secrets.ANYPOINT_CLIENT_ID}} -Danypoint.client.secret=${{secrets.ANYPOINT_CLIENT_SECRET}} -Danypoint.connected-app.id=${{secrets.ANYPOINT_CONNECTED_APP_ID}} -Danypoint.connected-app.secret=${{secrets.ANYPOINT_CONNECTED_APP_SECRET}} -Danypoint.username=${{secrets.ANYPOINT_USERNAME}} -Danypoint.password=${{secrets.ANYPOINT_PASSWORD}}
run: ./mvnw --batch-mode verify -Dtest=$GITHUB_TEST_SUITE -Danypoint.client.id=${{secrets.ANYPOINT_CLIENT_ID}} -Danypoint.client.secret=${{secrets.ANYPOINT_CLIENT_SECRET}} -Danypoint.connected-app.id=${{secrets.ANYPOINT_CONNECTED_APP_ID}} -Danypoint.connected-app.secret=${{secrets.ANYPOINT_CONNECTED_APP_SECRET}} -Danypoint.username=${{secrets.ANYPOINT_USERNAME}} -Danypoint.password=${{secrets.ANYPOINT_PASSWORD}}

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand Down

0 comments on commit 47e8c92

Please sign in to comment.