-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (75 loc) · 1.98 KB
/
Copy pathtests.yml
File metadata and controls
75 lines (75 loc) · 1.98 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
name: Tests
on:
workflow_dispatch:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- '3.13'
- '3.14'
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run linters
run: |
ruff check src tests
mypy src --ignore-missing-imports
- name: Run tests with coverage
run: pytest --cov=src --cov-report=xml --cov-report=term --cov-fail-under=80
env:
DATABASE_URL: "postgresql://test:test@localhost:5432/test_db"
- name: Upload coverage reports
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit safety
- name: Run security checks
run: |
bandit -r src -f json -o bandit-report.json || true
safety check --json || true
push-to-gitlab:
name: Push to GitLab
uses: DataKnifeAI/github-workflows/.github/workflows/reusable-gitlab-mirror-push.yml@main
needs:
- test
if: >-
always() && needs.test.result == 'success' &&
github.event_name == 'push' && github.ref == 'refs/heads/main'
secrets: inherit
with:
gitlab_mirror_path: dk-raas/dkai/high-command/high-command-api