-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6ab11f
commit 8fad439
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Continuous integration | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- "dev*" | ||
|
||
jobs: | ||
test: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
python-version: ["3.10", 3.11, 3.12] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
|
||
- name: Update pip and install the package | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ".[test]" | ||
- name: Run tests | ||
run: | | ||
python -m pytest tests | ||
- name: Install and run linters | ||
if: | | ||
matrix.python-version == 3.11 | ||
run: | | ||
python -m pip install ".[dev]" | ||
python -m ruff check . | ||
python -m ruff format --check . | ||
- name: Generate Report | ||
run: | | ||
coverage run -m pytest | ||
coverage xml | ||
- name: Upload Coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./coverage.xml | ||
flags: unittests | ||
verbose: true | ||
token: ${{secrets.CODECOV_TOKEN}} |