Skip to content

Commit

Permalink
add testing CI
Browse files Browse the repository at this point in the history
  • Loading branch information
visr committed Oct 6, 2023
1 parent 6a19ee9 commit 08b5bbe
Show file tree
Hide file tree
Showing 6 changed files with 475 additions and 4 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python Lint
on:
push:
branches: [main]
paths-ignore: [".teamcity/**"]
tags: ["*"]
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mypy:
name: Mypy
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
cache: true
- name: Prepare pixi
run: pixi run install-without-pre-commit
- name: Run mypy on hydamo
run: |
pixi run mypy-hydamo
43 changes: 43 additions & 0 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Python Tests
on:
push:
branches: [main]
paths-ignore: [".teamcity/**"]
tags: ["*"]
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Python ${{ matrix.python_version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
python_version:
- "3.9"
- "3.10"
- "3.11"
arch:
- x86
steps:
- uses: actions/checkout@v4

- uses: prefix-dev/[email protected]
with:
pixi-version: "latest"
cache: true
- name: Prepare pixi
run: pixi run install-without-pre-commit

- name: Run tests
run: pixi run test-hydamo

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
__pycache__/
*.py[cod]
*$py.class
htmlcov/
coverage.xml
.coverage
.coverage.*
.pytest_cache/

# mypy
Expand Down
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
patch:
default:
informational: true

project:
default:
informational: true
Loading

0 comments on commit 08b5bbe

Please sign in to comment.