This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
68 lines (56 loc) · 1.52 KB
/
tests.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Tests
on:
pull_request:
paths-ignore:
- "**.md"
- "docs/**"
- "**/test-docs.yaml"
push:
paths-ignore:
- "**.md"
- "docs/**"
- "**/test-docs.yaml"
workflow_dispatch:
jobs:
# Run tests
test:
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
# Keep running even if one job fails
fail-fast: false
matrix:
python:
- "3.8"
- "3.9"
steps:
- name: Clone Main Repo
uses: actions/checkout@v2
with:
path: main
- name: Install Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install alembic
run: sudo apt-get install alembic
# preserve pip cache to speed up installation
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('*requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install nbgrader
run: pip install nbgrader
- name: Install
run: make -C main dev
- name: Run tests
shell: 'script --return --quiet --command "bash {0}"'
run: make -C main test
- name: Create coverage report
run: make -C main test-create-cov
- name: Upload coverage report
run: make -C main test-push-cov