-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.73 KB
/
Copy pathci.yml
File metadata and controls
60 lines (57 loc) · 1.73 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: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
python-version: "3.12"
- run: uv sync --group dev
- name: Ruff
run: |
set -o pipefail
uv run ruff check src tests --output-format=full 2>&1 | tee ruff-output.txt
- name: Upload Ruff diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: ruff-diagnostics
path: ruff-output.txt
retention-days: 7
- name: Ruff format
run: |
set -o pipefail
uv run ruff format --check --diff src tests 2>&1 | tee ruff-format-output.txt
- name: Upload Ruff format diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: ruff-format-diagnostics
path: ruff-format-output.txt
retention-days: 7
- name: Mypy
run: uv run mypy src
- name: Pytest
run: uv run pytest
- name: Fixture pipeline smoke test
run: |
cp config/ledger.example.yml config/ledger.yml
uv run python -m ledger.cli --config config/ledger.yml --fixture-dir tests/fixtures
- name: dbt build
run: uv run dbt build --project-dir dbt --profiles-dir dbt
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.8"
- name: Terraform format
run: terraform -chdir=infra/gcp fmt -check -recursive
- name: Terraform validate
run: |
terraform -chdir=infra/gcp init -backend=false
terraform -chdir=infra/gcp validate