-
Notifications
You must be signed in to change notification settings - Fork 22
50 lines (47 loc) · 1.49 KB
/
tests.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
name: Linting and Tests
on: [ push ]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9.12
uses: actions/setup-python@v3
with:
python-version: 3.9.12
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file environment.yaml --name base
python -m pip install -r install-extras-torch-geometric.txt -f https://data.pyg.org/whl/torch-1.11.0+cpu.html
python -m pip list
python --version
python -c 'import torch_geometric'
- name: Lint
run: |
pre-commit run --all
- name: Test with pytest
run: |
pytest --junitxml=report.xml -v -s --no-cov-on-fail --cov=.
flake8 . --exit-zero --output-file=flake8.txt
coverage xml
- name: Archive junit test results
uses: actions/upload-artifact@v3
with:
name: junit
path: report.xml
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: cobertura
path: coverage.xml
- name: Archive flake8 code style results
uses: actions/upload-artifact@v3
with:
name: flake8
path: flake8.txt