-
Notifications
You must be signed in to change notification settings - Fork 17
54 lines (41 loc) · 1.24 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
51
52
53
54
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
# - name: Install Poetry
# run: |
# curl -sSL https://install.python-poetry.org | python3 -
# - name: Install dependencies
# run: poetry install
# - name: Install torch cuda
# run: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# - name: Run tests
# run: poetry run pytest
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip3 install torch torchvision torchaudio
pip install pytest
pip install pytest-cov
- name: Print PyTorch and CUDA info
run: |
python -c "import torch; print(torch.__version__)"
python -c "import torch; print(torch.cuda.is_available())"
- name: Run tests
run: pytest -vv --cov=pipegoose tests/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}