Skip to content

Integration Test Windows #560

Integration Test Windows

Integration Test Windows #560

Workflow file for this run

name: Integration Test Windows
on:
schedule:
- cron: '0 1 * * *'
jobs:
verify_commit:
runs-on: ubuntu-latest
name: Verify latest commit
outputs:
RUN_BUILD: ${{ steps.verify_commit.outputs.RUN_BUILD }}
steps:
- uses: actions/checkout@v3
- id: verify_commit
name: Verify latest commit is less than 24 hours
if: ${{ github.event_name == 'schedule' }}
run: echo '::set-output name=RUN_BUILD::'$(test -n "$(git log --format=%H --since='24 hours ago')" && echo 'true' || echo 'false')
test:
name: Integration test Windows
runs-on: windows-latest
needs: verify_commit
if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: '17'
- name: Set up shellcheck
run: choco install shellcheck
- name: Build project with Maven
run: |
export INTEGRATION_TEST=true
mvn -B -ntp -Dstyle.color=always install
cancel:
name: Cancel this workflow
runs-on: ubuntu-latest
needs: verify_commit
if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
RUN_ID: ${{ github.run_id }}
steps:
- run: |
curl -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" "https://api.github.com/repos/$OWNER/$REPO/actions/runs/$RUN_ID/cancel"