-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.21 KB
/
ci.yaml
File metadata and controls
71 lines (60 loc) · 2.21 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
name: CI
"on":
pull_request:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
# yamllint disable-line rule:line-length rule:comments
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Check formatting
# yamllint disable-line rule:line-length rule:comments
uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # v3.5.1
with:
args: "format src/ --check"
- name: Check linting
# yamllint disable-line rule:line-length rule:comments
uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1 # v3.5.1
with:
args: "check src/"
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- name: Checkout repository
# yamllint disable-line rule:line-length rule:comments
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install uv and set Python ${{ matrix.python-version }}
# yamllint disable-line rule:line-length rule:comments
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: uv run --extra dev pytest -v
build:
if: github.event_name != 'push' || github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
# yamllint disable-line rule:line-length rule:comments
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Docker Buildx
# yamllint disable-line rule:line-length rule:comments
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Build container
# yamllint disable-line rule:line-length rule:comments
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: ./Containerfile
push: false
cache-from: type=gha
cache-to: type=gha,mode=max