Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI add test for macos and windows #52

Merged
merged 4 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Lint

on:
workflow_call:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: default
cache: true

- name: Re-install local
run: |
pixi run rebuild

- name: Lint with ruff
run: |
pixi run lint
- name: Lint with cython-lint
run: |
pixi run cython-lint
- name: Format with black
run: |
pixi run fmt
- name: Type check with mypy
run: |
pixi run type
- name: Test coverage
shell: bash
run: |
FMT=xml pixi run test-coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build SDist
run: |
pixi run build-sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
39 changes: 11 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ on:
branches: ["*.X"]

jobs:
call-lint:
uses: ./.github/workflows/lint.yml
secrets: inherit

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
Expand All @@ -22,18 +30,6 @@ jobs:
run: |
pixi run rebuild

- name: Lint with ruff
run: |
pixi run lint
- name: Lint with cython-lint
run: |
pixi run cython-lint
- name: Format with black
run: |
pixi run fmt
- name: Type check with mypy
run: |
pixi run type
- name: Test with pytest
run: |
pixi run test
Expand All @@ -42,19 +38,6 @@ jobs:
run: |
pixi run doc
CMD=doctest pixi run doc
- name: Test coverage
shell: bash
run: |
FMT=xml pixi run test-coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build SDist
- name: Test nogil
run: |
pixi run build-sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
pixi run nogil-eta
Loading
Loading