Skip to content

Commit

Permalink
Merge pull request #32 from kostrykin/dev/update-ci
Browse files Browse the repository at this point in the history
Migrate to BMCV/github-workflows
  • Loading branch information
kostrykin authored Oct 2, 2024
2 parents 71cf5d0 + fc81e44 commit 834925f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 47 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/post-pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Post pull request comment

on:
workflow_run:
workflows: [Tests]
types: [completed]

jobs:
post_pr_comment:
uses: BMCV/github-workflows/.github/workflows/coverage-post-pr-comment.yml@main
secrets:
github-auth: ${{ secrets.GITHUB_TOKEN }}
60 changes: 13 additions & 47 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,19 @@ on:
pull_request:
branches: ['*']

permissions:
contents: read
issues: write
pull-requests: write

jobs:

run_tests:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"

steps:

- uses: actions/checkout@v4
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'

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

- name: Install dependencies
uses: BMCV/github-workflows/.github/workflows/coverage-run.yml@main
with:
main_branch: master
python_versions: '["3.9", "3.10", "3.11", "3.12"]'
main_python_version: "3.10" # report test coverage using Python 3.10, since Python 3.9 skips the `test_textual` tests
gist-id: 5f8b1433a1c405da22639f817d6a38d9
gist-filename: repype.json
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tests/requirements.txt
- name: Run tests
uses: kostrykin/report-test-coverage-action@v1.0.2
with:
report: ${{ strategy.job-index == 1 }} # report test coverage using Python 3.10, since Python 3.9 skips the `test_textual` tests
gist-id: 5f8b1433a1c405da22639f817d6a38d9
github-auth: ${{ secrets.GITHUB_TOKEN }}
gist-auth: ${{ secrets.GIST_SECRET }}
gist-filename: pypers.json
run: |
coverage run -m unittest discover
coverage combine
coverage json --omit "tests/*","repype/textual/demo.py"
env:
REPYPE_WATCHDOG_TIMEOUT: 1
coverage run -m unittest discover
coverage combine
coverage json --omit "tests/*","repype/textual/demo.py"
env: '{"REPYPE_WATCHDOG_TIMEOUT": 1}'
secrets:
gist-auth: ${{ secrets.GIST_SECRET }}

0 comments on commit 834925f

Please sign in to comment.