Skip to content

Integration Test MacOS #542

Integration Test MacOS

Integration Test MacOS #542

Workflow file for this run

name: Integration Test MacOS
on:
schedule:
- cron: '0 2 * * *'
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 MacOS
runs-on: macos-latest
needs: verify_commit
if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
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: brew 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"