-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.08 KB
/
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
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- github-ci
jobs:
test-suite:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12, 3.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
poetry install --with dev
- name: Run tests with coverage
run: |
poetry run pytest --cov=app --cov-report=term-missing
continue-on-error: false
- name: Run Bandit for security analysis
run: |
poetry run bandit -r app
continue-on-error: false
- name: Run Ruff for linting
run: |
poetry run ruff check .
continue-on-error: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Docker image and run tests (during build)
run: |
docker build --target test -t zephir-api2:test .