-
Notifications
You must be signed in to change notification settings - Fork 52
81 lines (67 loc) · 2.4 KB
/
db-compatibility.yaml
File metadata and controls
81 lines (67 loc) · 2.4 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
name: Database Compatibility
# Path policy: run this workflow only for persistence-relevant changes.
# Scoped intentionally to tracker-core — the jobs call persistence methods
# directly against real database instances, so broader dependency closure
# is not required. General compile/cross-package regressions are covered by
# the Testing workflow.
# See .github/workflows/docs-lint.yaml for the lightweight docs-only workflow.
on:
push:
paths:
- "packages/tracker-core/**"
- ".github/workflows/db-compatibility.yaml"
pull_request:
paths:
- "packages/tracker-core/**"
- ".github/workflows/db-compatibility.yaml"
env:
CARGO_TERM_COLOR: always
jobs:
database-compatibility-mysql:
name: Database Compatibility MySQL (${{ matrix.mysql-version }})
runs-on: ubuntu-latest
strategy:
matrix:
mysql-version: ["8.0", "8.4"]
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v6
- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- id: cache
name: Enable Job Cache
uses: Swatinem/rust-cache@v2
- id: database
name: Run Database Compatibility Test
env:
TORRUST_TRACKER_CORE_RUN_MYSQL_DRIVER_TEST: "true"
TORRUST_TRACKER_CORE_MYSQL_DRIVER_IMAGE_TAG: ${{ matrix.mysql-version }}
run: cargo test -p bittorrent-tracker-core --features db-compatibility-tests run_mysql_driver_tests -- --nocapture
database-compatibility-postgres:
name: Database Compatibility PostgreSQL (${{ matrix.postgres-version }})
runs-on: ubuntu-latest
strategy:
matrix:
postgres-version: ["14", "15", "16", "17"]
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v6
- id: setup
name: Setup Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- id: cache
name: Enable Job Cache
uses: Swatinem/rust-cache@v2
- id: database
name: Run Database Compatibility Test
env:
TORRUST_TRACKER_CORE_RUN_POSTGRES_DRIVER_TEST: "true"
TORRUST_TRACKER_CORE_POSTGRES_DRIVER_IMAGE_TAG: ${{ matrix.postgres-version }}
run: cargo test -p bittorrent-tracker-core --features db-compatibility-tests run_postgres_driver_tests -- --nocapture