-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.27 KB
/
build-test.yaml
File metadata and controls
61 lines (48 loc) · 1.27 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
name: Build and test
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
services:
docker:
image: docker:24.0.7
options: >-
--privileged
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup uv
id: setup-uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-suffix: "uv-cache"
- name: Install dependencies with uv
run: uv sync
- name: Set Docker host for Testcontainers
run: echo "DOCKER_HOST=unix:///var/run/docker.sock" >> $GITHUB_ENV
- name: Run ruff (lint)
run: uv run --frozen ruff check .
- name: Run pyright (type check)
run: uv run --frozen pyright
- name: Run tests with pytest
run: uv run --frozen pytest
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage.xml
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}