copy tink example to not forget about the project #2944
This file contains hidden or 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: Run tests | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '**.java' | |
- 'build.gradle' | |
- 'gradle/wrapper/**' | |
- '.github/workflows/test.yml' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '**.java' | |
- 'build.gradle' | |
- 'gradle/wrapper/**' | |
# schedule: | |
# - cron: "0 */3 * * *" | |
# Cancel existing executions when new commits are pushed onto the branch | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }}-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
java: [21] | |
os: [ubuntu, windows] | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: Set up latest JDK N from jdk.java.net | |
uses: oracle-actions/setup-java@v1 | |
with: | |
website: jdk.java.net | |
release: ${{ matrix.java }} | |
- name: Run Gradle's test task | |
run: ./gradlew -i --no-daemon --parallel --continue --build-cache --stacktrace test | |
env: | |
GH_USERNAME: 'GitHub Action' | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v5 | |
if: success() || failure() | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
retention-days: 1 | |
auto-merge: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
- name: auto-merge | |
if: | | |
github.actor == 'dependabot[bot]' && | |
github.event_name == 'pull_request' | |
run: | | |
gh pr merge --auto --rebase "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
# this secret needs to be in the settings.secrets.dependabot | |
GITHUB_TOKEN: ${{secrets.GH_ACTION_TOKEN}} |