Repository navigation
86 lines (73 loc) · 2.16 KB
/
Copy pathtest.yml
File metadata and controls
86 lines (73 loc) · 2.16 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
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
python-version: ['3.9', '3.13']
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install package + test extras
run: pip install -e ".[test]"
- name: Import smoke
run: python -c "import modules.main, checks, datasources"
- name: Type check
run: python -m mypy --ignore-missing-imports --follow-imports=silent checks/core/
- name: Run framework tests
run: >-
pytest tests/ -v --maxfail=5
-m "not neo4j and not integration"
--cov=modules --cov=checks --cov=datasources
--cov-report=xml --cov-report=term
- name: Upload coverage
if: matrix.python-version == '3.13'
uses: codecov/codecov-action@v7
with:
files: coverage.xml
fail_ci_if_error: false
neo4j-fixture-tests:
runs-on: ubuntu-latest
timeout-minutes: 20
services:
neo4j:
image: neo4j:4.4
env:
NEO4J_AUTH: neo4j/testpassword
NEO4J_PLUGINS: '[]'
ports:
- 7687:7687
options: >-
--health-cmd "cypher-shell -u neo4j -p testpassword 'RETURN 1'"
--health-interval 5s
--health-timeout 5s
--health-retries 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.13'
cache: pip
cache-dependency-path: pyproject.toml
- name: Install package + test extras
run: pip install -e ".[test]"
- name: Run Neo4j fixture tests
env:
ADPF_TEST_ALLOW_WIPE: '1'
NEO4J_URI: bolt://localhost:7687
NEO4J_USER: neo4j
NEO4J_PASSWORD: testpassword
run: pytest tests/ -v --maxfail=5 -m "neo4j and not integration" --no-cov