-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (40 loc) · 1.17 KB
/
linting.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
name: linting
# Triggers the workflow on push for all branches
on:
push:
branches:
- '*'
paths-ignore:
pyproject.toml
jobs:
lint:
runs-on: ubuntu-latest
steps:
# Check out repo and set up Python
- uses: actions/checkout@v3
with:
lfs: true
- name: checkout test data
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.TEST_DATA_ACCESS_KEY }}'
git submodule sync --recursive
git submodule update --init --recursive
# Use cached python and dependencies, install poetry
- name: "Setup Python, Poetry and Dependencies"
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: 3.8
poetry-version: 1.2.2
# Linting steps, excute all linters even if one fails
- name: ruff
run:
poetry run ruff specsanalyzer specsscan tests
- name: ruff formating
if: ${{ always() }}
run:
poetry run ruff format --check specsanalyzer specsscan tests
- name: mypy
if: ${{ always() }}
run:
poetry run mypy specsanalyzer specsscan tests