Skip to content

Commit

Permalink
ci: try reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Nov 5, 2023
1 parent 0386cbb commit 43b484b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ on:

jobs:
test:
name: ${{ matrix.platform }} (${{ matrix.python-version }}) ${{ matrix.backend }}
runs-on: ${{ matrix.platform }}
uses: pyapp-kit/.github/workflows/reusable-ci.yml@main
strategy:
fail-fast: false
matrix:
Expand All @@ -38,26 +37,10 @@ jobs:
exclude:
- python-version: "3.11"
backend: pyside2

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: tlambert03/[email protected]
- name: Install dependencies
run: python -m pip install --upgrade hatch

- name: Test
uses: aganders3/headless-gui@v1
with:
run: hatch -v run +backend=${{ matrix.backend }} test:run

- name: Coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
with:
os: ${{ matrix.platform }}
python-version: ${{ matrix.python-version }}
qt: ${{ matrix.backend }}

test-pydantic1:
name: Test pydantic1
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tqdm = ["tqdm>=4.30.0"]
jupyter = ["ipywidgets>=8.0.0"]
image = ["pillow>=4.0"]
quantity = ["pint>=0.13.0"]
testing = [
test = [
"pytest",
"pytest-qt",
"pytest-cov",
Expand Down Expand Up @@ -140,7 +140,7 @@ documentation = "https://pyapp-kit.github.io/magicgui/"
source = "vcs"

[tool.hatch.envs.test]
features = ["testing"]
features = ["test"]
[tool.hatch.envs.test.scripts]
run = "pytest -v --color=yes --cov-config=pyproject.toml --cov --cov-report=xml --cov-report=term-missing"
[[tool.hatch.envs.test.matrix]]
Expand Down

0 comments on commit 43b484b

Please sign in to comment.