From 43b484b938baabc15aa89fa837be4dedc960a5de Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Sun, 5 Nov 2023 09:52:08 -0500 Subject: [PATCH] ci: try reusable workflow --- .github/workflows/test_and_deploy.yml | 27 +++++---------------------- pyproject.toml | 4 ++-- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index f5fa85af2..6da623273 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -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: @@ -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/setup-qt-libs@v1.5 - - 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 diff --git a/pyproject.toml b/pyproject.toml index e4212970b..8046f7011 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -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]]