-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (42 loc) · 1.18 KB
/
main.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
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.12, 3.9]
poetry-version: [1.3.1]
env:
IS_COVERAGE_ALLOWED: ${{ secrets.CODACY_PROJECT_TOKEN != '' }}
IS_MASTER_BRANCH: ${{ github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install pip dependencies
run: poetry install
- name: Run tests
run: poetry run pytest --cov-report xml --cov=autopr test/ -v
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.3.1
- name: Install pip dependencies
run: poetry install
- name: Run pre-commit
run: poetry run pre-commit run --all-files --show-diff-on-failure