-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (43 loc) · 1.56 KB
/
python-app.yml
File metadata and controls
54 lines (43 loc) · 1.56 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main"]
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up uv (Python 3.12)
uses: astral-sh/setup-uv@v6.6.0
with:
python-version: "3.12"
activate-environment: true
enable-cache: true
- name: Set timezone
run: sudo timedatectl set-timezone Europe/Vienna
- name: Run pre-commit with prek
run: uv run --dev prek run -a
- name: Test with pytest
run: uv run --dev pytest
# integration tests for DetectMateService
- name: Checkout DetectMateService
uses: actions/checkout@v4
with:
repository: ait-detectmate/DetectMateService
path: DetectMateService
- name: Prepare DetectMateService (using local DetectMateLibrary)
working-directory: DetectMateService
run: |
# remove the git-based dependency so we don't override the local lib
sed -i '/detectmatelibrary @ git+/d' pyproject.toml
- name: Prepare packages
working-directory: DetectMateService
run: uv pip install .
- name: Run DetectMateService library integration tests
working-directory: DetectMateService
run: pytest tests/library_integration