-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.04 KB
/
lint-and-test.yaml
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
name: Lint and Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: "Setup Python"
uses: "actions/setup-python@v4"
with:
python-version: "3.11"
cache: "pipenv"
cache-dependency-path: "Pipfile.lock"
- name: "Install pipenv"
run: "pip install pipenv wheel"
- name: "Install dependencies"
run: "pipenv install --dev"
- name: "Run pyre"
run: |
set -o pipefail
pipenv run pyre | tee >(sed 's, ,:,' | awk -F: '{sub(" ", "", $5); print "::error file=" ENVIRON["PWD"] "/" $1 ",line=" $2 ",col=" $3 ",title=" $4 "::" $5}')
- name: "Run ruff"
run: "pipenv run ruff check --output-format github ."
- name: "Run black"
run: |
set -o pipefail
pipenv run black --check --diff .
- name: Run tests
run: |
pipenv run pytest