Run tests #23
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: | |
workflow_dispatch: | |
# needed to allow julia-actions/cache to delete old caches that it has created | |
permissions: | |
actions: write | |
contents: read | |
concurrency: | |
# group by workflow and ref; the last slightly strange component ensures that for pull | |
# requests, we limit to 1 concurrent job, but for the master branch we don't | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} | |
# Cancel intermediate builds, but only if it is a pull request build. | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
extra-long-test: | |
# Extra long tests | |
runs-on: [Linux, RPTU, normal-memory] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: "Set up Julia" | |
id: setup-julia | |
uses: julia-actions/setup-julia@v2 | |
with: | |
version: "1.10" | |
- name: "Build package" | |
uses: julia-actions/julia-buildpkg@v1 | |
- name: "set test subgroup" | |
run: echo "OSCAR_TEST_SUBSET=extra_long" >> $GITHUB_ENV | |
- name: "Run tests" | |
uses: julia-actions/julia-runtest@latest | |
# adapted from gap-system/gap | |
slack-notification: | |
name: Send Slack notification on status change | |
needs: | |
- extra-long-test | |
if: github.event_name == 'schedule' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get branch name | |
id: get-branch | |
run: echo "branch=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Determine whether CI status changed | |
uses: gap-actions/should-i-notify-action@v1 | |
id: should_notify | |
with: | |
branch: ${{ steps.get-branch.outputs.branch }} | |
needs_context: ${{ toJson(needs) }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
notify_on_changed_status: true | |
- name: Send slack notification | |
uses: act10ns/slack@v2 | |
if: ${{ steps.should_notify.outputs.should_send_message == 'yes' }} | |
with: | |
status: ${{ steps.should_notify.outputs.current_status }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |