This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.54 KB
/
test.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
name: Python package
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
# See https://stackoverflow.com/questions/72703363
defaults:
run:
shell: bash -l {0}
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Get environment.yml
run: |
mkdir environments
wget https://raw.githubusercontent.com/gnn-tracking/gnn_tracking/main/environments/minimal.yml -O environments/minimal.yml
- name: Install Conda environment from environment.yml
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environments/minimal.yml
environment-name: anaconda-client-env
cache-downloads: true
cache-env: true
- name: Pip update itself
run:
python -m pip install --upgrade pip
# Is already in the conda env, so lets be careful
- name: Pip update gnn_tracking
run: python -m pip install --upgrade 'gnn_tracking@git+https://github.com/gnn-tracking/gnn_tracking.git#egg=gnn_tracking'
- name: Pip install package
run: pip install .[testing]
- name: Test with pytest
run: pytest
- name: Explicitly convert coverage to xml
run: coverage xml
- name: Upload coverage report
uses: codecov/[email protected]