-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (61 loc) · 1.82 KB
/
core-backend-tests.yaml
File metadata and controls
71 lines (61 loc) · 1.82 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
---
name: Minimal Tests
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
env:
FORCE_COLOR: "1"
jobs:
minimal_tests:
name: Minimal Tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup Python
uses: ./.github/actions/setup-python/
with:
python-version: ${{ matrix.python-version }}
# pre-commit checks handled by pre-commit.ci
- name: Run tests
env:
DJANGO_SETTINGS_MODULE: backend.server.settings.dev
run: |
uv run coverage run --rcfile=pyproject.toml --source=. -m \
pytest -x -vv ../tests/unit \
--ignore=../tests/unit/test_logs.py \
--ignore=../tests/unit/test_visitran_adapters \
--ignore=../tests/unit/test_visitran_backend \
-m "not snowflake and not bigquery and not trino and not postgres"
- name: Generate coverage report
run: |
uv run coverage report -m
uv run coverage xml
- name: Git fetch unshallow
working-directory: .
run: git fetch --unshallow
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v3
if: ${{ github.actor != 'dependabot[bot]' }}
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: ./
args: >
-Dproject.settings=./sonar-project.properties