-
-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (73 loc) · 2.48 KB
/
test.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
69
70
71
72
73
74
75
76
name: Python package
on: [push, pull_request]
jobs:
build-n-publish:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# see setup.py for supported versions
# here instead of having a matrix
# we only test combinations in a round-robin fashion
# make sure the versions are monotmonic increasing w.r.t. each other
# other wise e.g. an older version of a dependency may not work well with a newer version of Python
include:
- python-version: "3.8"
pandoc-version: "2.14.0.3"
- python-version: "3.9"
pandoc-version: "2.15"
- python-version: "3.10"
pandoc-version: "2.16.2"
- python-version: "3.10"
pandoc-version: "latest"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies—pip
run: |
pip install -U poetry setuptools
pip install .[extras,tests]
# let coverage read setup.py instead of pyproject.toml
make setup.py
mv pyproject.toml .pyproject.toml
- name: Install dependencies—pandoc
run: |
# pandoc
[[ ${{ matrix.pandoc-version }} == "latest" ]] && url="https://github.com/jgm/pandoc/releases/latest" || url="https://github.com/jgm/pandoc/releases/tag/${{ matrix.pandoc-version }}"
downloadUrl="https://github.com$(curl -L $url | grep -o '/jgm/pandoc/releases/download/.*-amd64\.deb')"
wget --quiet "$downloadUrl"
sudo dpkg -i "${downloadUrl##*/}"
- name: Sanity check
run: |
pip check
python -c 'import amsthm'
- name: Tests
run: |
make test
coverage combine | true
coverage report
coverage xml
coverage lcov
- name: Coverage—Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.test_number }}
parallel: true
path-to-lcov: ./coverage.lcov
finish:
needs: build-n-publish
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true