-
-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (58 loc) · 1.83 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
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-latest
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
tidy-version:
- "5.6.0"
include:
- os: ubuntu-22.04
python-version: "3.11"
tidy-version: "5.8.0"
- os: ubuntu-20.04
python-version: "3.11"
tidy-version: "os"
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}, tidy ${{ matrix.tidy-version }}
steps:
- uses: actions/checkout@v3
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install tidy
run: ./scripts/install-tidy.sh ${{ matrix.tidy-version }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt -r requirements-test.txt
- name: Test
run: |
py.test --cov=tidy tidy
- name: Coverage
run: |
coverage xml
- name: Install editable
run: pip install -e .
- name: Check used library
run: python -c 'import tidy.lib; print(tidy.lib._tidy.lib._name, tidy.lib.getTidyVersion())'
- uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
flags: unittests
name: Python ${{ matrix.python-version }}, ${{ matrix.os }}, tidy ${{ matrix.tidy-version }}