-
Notifications
You must be signed in to change notification settings - Fork 25
93 lines (90 loc) · 2.48 KB
/
validator_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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Run Validator QA
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
env:
PYTHON_DEFAULT_VERSION: "3.11"
jobs:
linter:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./validator
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.3"
enable-cache: true
- name: Install dependencies
run: python -m pip install --upgrade nox
- name: Create dotenv file
run: cp ./envs/dev/.env.template .env
- name: Run linters
run: nox -vs lint
type_check:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./validator
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.3"
enable-cache: true
- name: Install dependencies
run: python -m pip install --upgrade nox
- name: Create dotenv file
run: cp ./envs/dev/.env.template .env
- name: Run mypy
run: nox -vs type_check
test:
timeout-minutes: 10
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./validator
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_DEFAULT_VERSION }}
cache: "pip"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.3"
enable-cache: true
- name: Install dependencies
run: python -m pip install --upgrade nox
- name: Prepare environment
run: ./setup-dev.sh
- name: Run dockerized services
run: docker compose up -d --wait
- name: Run unit tests
run: nox -vs test
- name: Stop dockerized services
if: success() || failure()
run: docker compose down -v