-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (54 loc) · 1.75 KB
/
pythonapp.yaml
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
55
56
57
58
59
60
61
62
name: unittest
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7.8]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache python dependencies
uses: actions/cache@v2
id: cache
with:
path: /home/runner/.cache/${{ matrix.python-version }}
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install virtualenv
python -m venv ${pythonEnv}
source ${pythonEnv}/bin/activate
python -m pip install --upgrade pip
python -m pip install poetry torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install -r requirements.txt
env:
pythonEnv: /home/runner/.cache/${{ matrix.python-version }}
- name: Cache datasets
uses: actions/cache@v2
with:
path: data
key: lightning-geometric-datasets-v0
- name: Test with unittest
run: |
source ${pythonEnv}/bin/activate
pip install coverage pytest
make workflow-test
coverage xml
env:
pythonEnv: /home/runner/.cache/${{ matrix.python-version }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: codecov-umbrella