Repository navigation
77 lines (71 loc) · 2.11 KB
/
Copy pathtests.yml
File metadata and controls
77 lines (71 loc) · 2.11 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
name: ScipionAPI backend tests
on:
push:
branches:
- devel
- wizard-dialogs-refactor
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
backend-tests:
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: scipion_api_test
POSTGRES_USER: scipion_test
POSTGRES_PASSWORD: scipion_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U scipion_test -d scipion_api_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
valkey:
image: valkey/valkey:7.2.14
ports:
- 6379:6379
options: >-
--health-cmd "valkey-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
SCIPIONAPI_TEST_DATABASE_URL: postgresql+psycopg2://scipion_test:scipion_test@localhost:5432/scipion_api_test
SCIPIONAPI_TEST_DATABASE_NAME: scipion_api_test
SCIPIONAPI_TEST_DATABASE_USER: scipion_test
SCIPIONAPI_TEST_DATABASE_PASS: scipion_test
SCIPIONAPI_TEST_POSTGRES_HOST: localhost
SCIPIONAPI_TEST_POSTGRES_PORT: "5432"
BROKER_URL: redis://localhost:6379/0
RESULT_BACKEND_URL: redis://localhost:6379/0
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
os: [ubuntu-latest]
include:
# setup-python has no 3.8 or 3.9 builds after Ubuntu 24.04
- python-version: '3.8'
os: ubuntu-24.04
- python-version: '3.9'
os: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- run: python -m pip install --upgrade pip
- run: python -m pip install -e ".[test]"
- run: pip check
- run: pytest