-
Notifications
You must be signed in to change notification settings - Fork 47
49 lines (40 loc) · 1.21 KB
/
lint.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
name: Lint
on:
pull_request:
push:
branches:
- master
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
poetry-version: ['1.3.2']
steps:
- name: 'Checkout codes'
uses: actions/checkout@v4
- name: Setup poetry ${{ matrix.poetry-version }}
run: |
curl -O -sSL https://install.python-poetry.org/install-poetry.py
python install-poetry.py -y --version ${{ matrix.poetry-version }}
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
rm install-poetry.py
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
# This is required to do as of @actions/checkout@v3 to prevent default action python (3.8) from being used
poetry env use ${{ matrix.python-version }}
poetry install
- name: Print python versions
run: |
python -V
poetry run python -V
poetry -V
- name: Lint
run: poetry run lint