-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.47 KB
/
python.yml
File metadata and controls
60 lines (49 loc) · 1.47 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
name: Python
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Test Python
timeout-minutes: 10
runs-on: ubuntu-latest
env:
wd: ./
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{github.head_ref}}
lfs: true
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: |
${{ secrets.SSH_BC2_DEPLOY_PRIVATE_KEY }}
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
- name: Set up tesseract
run: sudo apt-get install -y tesseract-ocr
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python3.x
uses: actions/setup-python@v5
id: py
- name: Get requirements
working-directory: ${{env.wd}}
run: |
git config --global url."https://x-token-auth:${{ secrets.GH_PAT }}@github.com/".insteadOf "git@github.com:"
uv sync --locked --all-extras --dev
- name: Linting, formatting, and type checking
working-directory: ${{env.wd}}
run: uv run pre-commit run --show-diff-on-failure --all-files
- name: Unit tests
working-directory: ${{env.wd}}
run: uv run pytest ./tests/unit -vx
- name: Integration tests
working-directory: ${{env.wd}}
env:
GH_PAT: ${{secrets.GH_PAT}}
run: uv run pytest ./tests/integration -vx