Skip to content

Commit

Permalink
CI: Modernize examples test script
Browse files Browse the repository at this point in the history
- Rename workflow
- Run on each push (which allows developing on test branches in this repo)
- Run only on changes to the example models, the test script or the CI config
- Allow multiple commits after each other (to allow continuous trial and error
  • Loading branch information
EwoutH committed Aug 25, 2024
1 parent 6f09077 commit 3c031b5
Showing 1 changed file with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
name: build
name: Test example models

on:
push:
branches:
- main
- release**
paths-ignore:
- '**.md'
- '**.rst'
paths:
- 'examples/**/*.py' # If an example model is modified
- 'test_examples.py' # If the test script is modified
- '.github/workflows/test_examples.yml' # If this workflow is modified
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
paths:
- 'examples/**/*.py'
- 'test_examples.py'
- '.github/workflows/test_examples.yml'
workflow_dispatch:
schedule:
- cron: '0 6 * * 1' # Monday at 6:00 UTC

# This will cancel previous run if a newer job that obsoletes the said previous
# run, is started.
# Based on https://github.com/zulip/zulip/commit/4a11642cee3c8aec976d305d51a86e60e5d70522
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
# build-stable:
# runs-on: ubuntu-latest
Expand Down

0 comments on commit 3c031b5

Please sign in to comment.