|
1 | | -name: Backend Checks and Tests |
| 1 | +name: Integration Tests |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
8 | 8 | workflow_dispatch: |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - ruff: |
12 | | - name: Ruff Linting |
13 | | - runs-on: ubuntu-latest |
14 | | - steps: |
15 | | - - uses: actions/checkout@v4 |
16 | | - - name: Set up Python |
17 | | - uses: actions/setup-python@v4 |
18 | | - with: |
19 | | - python-version: '3.9' |
20 | | - - name: Install dependencies |
21 | | - run: | |
22 | | - python -m pip install --upgrade pip |
23 | | - pip install ruff |
24 | | - - name: Run ruff |
25 | | - run: ruff check backend/ --config backend/pyproject.toml |
26 | | - |
27 | | - mypy: |
28 | | - name: Mypy Type Checking |
29 | | - runs-on: ubuntu-latest |
30 | | - steps: |
31 | | - - uses: actions/checkout@v4 |
32 | | - - name: Set up Python |
33 | | - uses: actions/setup-python@v4 |
34 | | - with: |
35 | | - python-version: '3.9' |
36 | | - - name: Install dependencies |
37 | | - run: | |
38 | | - python -m pip install --upgrade pip |
39 | | - pip install mypy |
40 | | - pip install -r backend/requirements.txt |
41 | | - pip install -r backend/requirements-dev.txt |
42 | | - - name: Run mypy |
43 | | - run: mypy --config-file backend/pyproject.toml backend/ |
44 | | - |
45 | | - security-scan: |
46 | | - name: Security Scanning |
47 | | - runs-on: ubuntu-latest |
48 | | - steps: |
49 | | - - uses: actions/checkout@v4 |
50 | | - - name: Set up Python |
51 | | - uses: actions/setup-python@v4 |
52 | | - with: |
53 | | - python-version: '3.9' |
54 | | - - name: Install dependencies |
55 | | - run: | |
56 | | - python -m pip install --upgrade pip |
57 | | - pip install bandit safety |
58 | | - - name: Run bandit |
59 | | - run: bandit -r backend/ -x backend/tests/ -ll |
60 | | - |
61 | | - docker: |
62 | | - name: Docker Build & Scan |
63 | | - runs-on: ubuntu-latest |
64 | | - steps: |
65 | | - - uses: actions/checkout@v4 |
66 | | - - name: Set up Docker Buildx |
67 | | - uses: docker/setup-buildx-action@v2 |
68 | | - - name: Build Docker image |
69 | | - uses: docker/build-push-action@v4 |
70 | | - with: |
71 | | - context: ./backend |
72 | | - push: false |
73 | | - load: true |
74 | | - tags: integr8scode:test |
75 | | - cache-from: type=gha |
76 | | - cache-to: type=gha,mode=max |
77 | | - - name: Run Trivy vulnerability scanner |
78 | | - uses: aquasecurity/trivy-action@master |
79 | | - with: |
80 | | - image-ref: 'integr8scode:test' |
81 | | - format: 'table' |
82 | | - exit-code: '1' |
83 | | - ignore-unfixed: true |
84 | | - severity: 'CRITICAL,HIGH' |
85 | | - timeout: '5m0s' |
86 | | - |
87 | 11 | tests: |
88 | 12 | name: Backend Tests |
89 | 13 | runs-on: ubuntu-latest |
90 | | - needs: [ruff, mypy, security-scan, docker] |
91 | 14 | steps: |
92 | 15 | - uses: actions/checkout@v4 |
93 | 16 |
|
|
0 commit comments