Newer
Older
push:
branches:
- master
pull_request:
paths-ignore:
- "doc/*.rst"
schedule:
- cron: "17 3 * * 0"
lint:
name: Lint and typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Poetry
uses: dschep/install-poetry-action@v1.3
- name: Install Dependencies
run: poetry install
- name: "Flake8"
run: poetry run flake8 relate course accounts tests
- name: "Mypy"
run: poetry run mypy relate course
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
69
70
71
72
73
74
75
76
77
pytest:
name: Pytest-${{ matrix.suite }} on Py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
suite: ['base', 'postgres', 'expensive']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: dschep/install-poetry-action@v1.3
with:
create_virtualenvs: true
- name: Cache python dependencies
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pypoetry/virtualenvs
key: pypoetry-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
restore-keys: |
pypoetry-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Install OS dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get install gettext
- name: Run test suite
env:
RL_CI_TEST: ${{ matrix.suite }}
run: |
bash ./.ci/run-tests-for-ci.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
- name: Test command line tool
if: matrix.suite == "base"
run: |
git clone https://github.com/inducer/relate-sample
poetry shell
cd relate-sample
relate validate .
relate test-code questions/autograded-python-example.yml
relate expand-yaml flows/quiz-test.yml > /dev/null