Skip to content

Commit

Permalink
Merge pull request #60 from vil02/add_check_examples
Browse files Browse the repository at this point in the history
chore: add `check_examples.yml`
  • Loading branch information
vil02 authored Aug 1, 2024
2 parents eb598d3 + 3e89eda commit d9ad842
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/check_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: check_examples

'on':
workflow_dispatch:
workflow_run:
workflows: [publish]
types:
- completed
schedule:
- cron: '33 */9 * * *'

jobs:
check_examples:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version: ['3.10', 3.11, 3.12]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}

- name: Install puzzle-generator
run: |
pip install puzzle-generator
- name: Run examples
run: |
./run_all_examples_no_poetry.sh
...
3 changes: 1 addition & 2 deletions .github/workflows/python_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ jobs:
poetry install
- name: Run examples
working-directory: ./examples/
run: |
find . -name "*.py" -exec poetry run python3 {} +
./run_all_examples.sh
...
6 changes: 6 additions & 0 deletions run_all_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail

cd examples/
find . -name "*.py" -exec poetry run python3 {} +
6 changes: 6 additions & 0 deletions run_all_examples_no_poetry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -euo pipefail

cd examples/
find . -name "*.py" -exec python3 {} +

0 comments on commit d9ad842

Please sign in to comment.