-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.2 KB
/
ci.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: CI
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
name: lint
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install poetry
run: pip install poetry
- name: Install project dependencies
run: poetry install --no-ansi --with=dev
- name: Lint
run: poetry run lint
- name: Check format
run: poetry run format_check
- name: Type checker
run: poetry run pyright
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
env:
PYTHON_VERSION: ${{ matrix.python-version }}
name: test
steps:
- uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.PACKAGE_ACCESS_TOKEN }}" | docker login ghcr.io -u USERNAME --password-stdin
- name: Run tests
run: docker compose -f docker-compose-test.yaml up test --exit-code-from test
- name: Tear down test containers
run: docker compose -f docker-compose-test.yaml down