-
Notifications
You must be signed in to change notification settings - Fork 44
46 lines (44 loc) · 1.17 KB
/
ci-pipeline.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
name: Build
on:
push:
branches: [master]
pull_request:
branches:
- master
- '*'
jobs:
test_on_python_version:
# Python 3.6 isn't available on ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install linters
# only install linting libraries on python 3.8 since they don't suppot 3.6
if: matrix.python-version == 3.8
run: |
pip install click==8.0.1
pip install black==22.1.0
pip install ruff
- name: Install requirements
run: |
pip install -r requirements.txt
- name: Lint with ruff
# only run ruff on python 3.8
if: matrix.python-version == 3.8
run: |
ruff .
- name: Lint with black
# only run black on python 3.8
if: matrix.python-version == 3.8
run: |
black . --check
- name: Test with pytest
run: |
pytest -v