-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (38 loc) · 1.46 KB
/
pytest.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
name: pytest
on:
# Every push
push:
# When requested manually
workflow_dispatch:
# Every morning at 3am -- how does it know which branch to run??
schedule:
- cron: '0 3 * * *'
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Pull and run docker 🐋
shell: bash
run: |
docker pull stanfordaha/garnet:latest
docker run -d -it --name CONTAINER stanfordaha/garnet:latest bash
docker exec CONTAINER /bin/bash -c "rm -rf /aha/garnet"
docker exec CONTAINER /bin/bash -c "source /aha/bin/activate; pip install psutil"
docker cp ../garnet CONTAINER:/aha/garnet
- name: Run tests ⚙️
shell: bash
run: |
docker exec -i CONTAINER bash -c "/aha/garnet/.github/scripts/run_pytest.sh"
- name: Upload Coverage
shell: bash
# CODECOV_TOKEN secret stored at https://github.com/StanfordAHA/garnet/settings/secrets/actions
run: |
docker exec -i CONTAINER bash -c "cd /aha/garnet/ && bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}"