-
Notifications
You must be signed in to change notification settings - Fork 23
50 lines (42 loc) · 1.02 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 }}