Update pre-commit hooks #1017
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
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
jobs: | |
test: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }}-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [Ubuntu, macOS, Windows] | |
python-version: [3.8, 3.9] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up TorchTS | |
uses: ./.github/actions/setup-torchts | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run tests | |
run: poetry run pytest tests/ --cov=torchts | |
- name: Generate coverage report | |
run: poetry run coverage xml | |
- name: Upload coverage report | |
if: success() | |
uses: codecov/codecov-action@v4 | |
with: | |
file: ./coverage.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |