-
Notifications
You must be signed in to change notification settings - Fork 68
66 lines (52 loc) · 1.38 KB
/
run-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
# Workflow for running the test suite
name: Run tests
on:
push:
branches:
- master
- beta
- release
pull_request:
branches:
- master
- beta
- release
- temp
workflow_dispatch:
jobs:
build:
name: Test suite
runs-on: ubuntu-latest
env:
TAR: /bin/tar
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-tinytex@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: liskin/gh-pipx@v1
with:
packages: >-
poetry
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
init-shell: >-
bash
cache-environment: true
cache-environment-key: requirements-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
micromamba activate otter-grader
poetry install --with test --all-extras
- name: Install ottr
run: |
micromamba run -n otter-grader Rscript -e 'install.packages("ottr", dependencies=TRUE, repos="https://cran.r-project.org/")'
- name: Run tests
run: |
micromamba activate otter-grader
make testcov DOCKER=false PYTESTOPTS="-vv" && coverage lcov -i
- name: Coveralls
uses: coverallsapp/github-action@v2