Skip to content

Commit

Permalink
separate workflow for testing stubs (#1701)
Browse files Browse the repository at this point in the history
* separate workflow for testing stubs

* remove 3.5 and 3.6
  • Loading branch information
madhur-ob authored Jan 25, 2024
1 parent a40e971 commit e9ddfc9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 11 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/test-stubs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test Stubs
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_call:

permissions: read-all

jobs:
Python:
name: core / Python ${{ matrix.ver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
ver: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0

- name: Set up Python
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{ matrix.ver }}

- name: Install metaflow
run: pip install .

- name: Install metaflow-stubs
run: metaflow develop stubs install --force

- name: Run mypy tests
uses: nick-fields/retry@v2
with:
max_attempts: 2
retry_on: error
command: cd ./stubs && pytest --mypy-ini-file test/setup.cfg --mypy-only-local-stub && cd -
on_retry_command: |
[[ $(pwd) == *stubs ]] && cd ..
11 changes: 0 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ jobs:
- name: Execute Python tests
run: tox

- name: Install metaflow
run: pip install .

- name: Install metaflow-stubs
if: contains(fromJson('["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]'), matrix.ver)
run: metaflow develop stubs install --force

- name: Run mypy tests for Python 3.7 to 3.12
if: contains(fromJson('["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]'), matrix.ver)
run: cd ./stubs && pytest --mypy-ini-file test/setup.cfg --mypy-only-local-stub && cd -

R:
name: core / R ${{ matrix.ver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit e9ddfc9

Please sign in to comment.