-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.01 KB
/
test_lint_build.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: "Test, Lint and Build"
on:
pull_request:
paths:
- 'content/**'
- 'lib/**'
- 'pyproject.toml'
- 'poetry.lock'
- '.github/worklows/test_lint_build.yml'
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
lint_test_build:
runs-on: ubuntu-latest
env:
PYTHONPATH: "lib/:${PYTHONPATH}"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup virtualenv
uses: ./.github/actions/setup-venv
with:
venv-path: .venv
- name: Check poetry.lock
run: .venv/bin/python3 -m poetry check --lock
- name: Run formatters
run: |
.venv/bin/python3 -m ruff check lib/
.venv/bin/python3 -m ruff format --check lib/
- name: Run tests
run: .venv/bin/python3 -m pytest lib/tests/
- name: Run build
run: .venv/bin/python3 -m dsets build