Skip to content

Commit ab853c3

Browse files
committed
chore(ci): update tests to run pytest
1 parent 175cd1d commit ab853c3

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

.github/workflows/tests.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
name: Tests
22

33
on:
4-
pull_request:
5-
branches: [ "*" ]
4+
push:
5+
branches: ["*"]
66

77
jobs:
88
tests:
9+
name: Tests
910
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
python-version: ["3.7", "3.8", "3.9", "3.10"]
14+
1015
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions/setup-python@v2
13-
- name: Install pre-commit
16+
- uses: actions/checkout@v3
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
1422
run: |
1523
python -m pip install --upgrade pip
16-
pip install pre-commit
24+
pip install -r tests/requirements.txt
25+
pip install -e .
1726
- name: Run tests
18-
run: ./tests.sh
27+
run: ./tests/run.sh

tests/run.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
#!/usr/bin/env bash
3+
set -eux
4+
5+
pytest --cov=conventional_pre_commit --cov-branch --import-mode=importlib
6+
7+
# clean out old coverage results
8+
rm -rf coverage
9+
coverage html --directory coverage

0 commit comments

Comments
 (0)