-
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
Showing
4 changed files
with
262 additions
and
3 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,71 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
tests: | ||
name: ${{ matrix.os }} - ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.image }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.12"] | ||
os: [ Ubuntu, macOS, Windows ] | ||
include: | ||
- os: Ubuntu | ||
image: ubuntu-22.04 | ||
- os: Windows | ||
image: windows-2022 | ||
- os: macOS | ||
image: macos-12 | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup headless display | ||
uses: pyvista/setup-headless-display-action@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install poetry | ||
run: curl -sSL https://install.python-poetry.org | python - -y | ||
|
||
- name: Update poetry path | ||
if: ${{ matrix.os != 'Windows' }} | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Update poetry path for windows | ||
if: ${{ matrix.os == 'Windows' }} | ||
run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH | ||
|
||
- name: Configure poetry | ||
run: poetry config virtualenvs.in-project true | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Check quality | ||
run: | | ||
poetry run pre-commit run --all-files | ||
- name: Check tests | ||
run: | | ||
poetry run mypy | ||
poetry run pytest tests/ --cov=src | ||
- name: Publish coverage | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
pip install coveralls | ||
coveralls --service=github |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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