Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Nov 3, 2024
1 parent 14e552e commit 1eab082
Showing 1 changed file with 47 additions and 17 deletions.
64 changes: 47 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: CI

on:
push:
branches:
- main
tags:
- "v*"
branches: [main]
tags: [v*]
pull_request:
workflow_dispatch:
schedule:
Expand All @@ -24,23 +22,55 @@ jobs:
- run: pipx run check-manifest

test:
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2
with:
os: ${{ matrix.platform }}
python-version: ${{ matrix.python-version }}
coverage-upload: artifact
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
platform: [ubuntu-latest, macos-latest, windows-latest]

upload_coverage:
if: always()
needs: [test]
uses: pyapp-kit/workflows/.github/workflows/upload-coverage.yml@v2
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
include:
- platform: macos-13
python-version: "3.12"

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
- name: Set cache path
shell: bash
run: |
set -e
CACHE_PATH=$(python -c 'from pymmcore_plus import install; print(install.USER_DATA_MM_PATH)')
echo "CACHE_PATH=$CACHE_PATH" >> $GITHUB_ENV
- name: Cache Drivers
id: cache-mm-build
uses: actions/cache@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ runner.os }}-mmbuild-${{ hashFiles('src/pymmcore_plus/_build.py') }}

- name: Install Micro-Manager
if: steps.cache-mm-build.outputs.cache-hit != 'true'
run: mmcore install

- name: Test
run: pytest -v --color=yes --cov=pymmcore_plus --cov-report=xml

- name: Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

deploy:
name: Deploy
Expand Down

0 comments on commit 1eab082

Please sign in to comment.