-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (64 loc) · 2.62 KB
/
Copy pathci.yml
File metadata and controls
88 lines (64 loc) · 2.62 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
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
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
runs-on: ubuntu-24.04
steps:
# actions/checkout v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
# actions/setup-python v5.6.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: "3.11"
cache: "pip"
# hashicorp/setup-terraform v3.1.2
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
terraform_version: "1.8.5"
- name: Install dependencies
run: |
python -m pip install --upgrade pip==25.1.1
python -m pip install -e ".[dev]"
- name: Format check
run: ruff format --check .
- name: Lint
run: ruff check .
- name: Type check
run: mypy src tests
- name: Tests with coverage
run: pytest --cov --cov-report=term-missing --cov-fail-under=85
- name: Authentication security tests
run: pytest tests/security/test_api_security_controls.py -q -k "token or auth"
- name: API security tests
run: pytest tests/security/test_api_security_controls.py -q
- name: Threat model validation
run: python -m genomic_research_access_api.security.threat_model.validate
- name: Threat model evidence verification
run: python -m genomic_research_access_api.security.threat_model.evidence --verify
- name: API security evidence verification
run: python -m genomic_research_access_api.security.api_security.evidence --verify
- name: Terraform format check
run: python scripts/terraform_local.py fmt-check
- name: Terraform init without backend
run: python scripts/terraform_local.py init
- name: Terraform validate
run: python scripts/terraform_local.py validate
- name: Terraform tests
run: python scripts/terraform_local.py test
- name: Infrastructure policy tests
run: pytest infrastructure/tests -q
- name: Infrastructure evidence verification
run: python -m genomic_research_access_api.security.infrastructure.evidence --verify
- name: Application import and OpenAPI validation
run: python -c "from genomic_research_access_api.main import app; assert app.openapi()['info']['title'] == 'Genomic Research Access API'"
- name: Docker build validation
run: docker build -t genomic-research-access-api:ci .