forked from healthchecks/healthchecks
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.94 KB
/
Copy pathtests.yml
File metadata and controls
57 lines (54 loc) · 1.94 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
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
db: [sqlite, postgres, mysql, mariadb]
python-version: ["3.12", "3.13", "3.14"]
include:
- db: postgres
db_user: runner
db_password: ""
- db: mysql
db_user: root
db_password: root
- db: mariadb
db_user: root
db_password: ""
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Start MySQL
if: matrix.db == 'mysql'
run: sudo systemctl start mysql.service
- name: Start PostgreSQL
if: matrix.db == 'postgres'
run: |
sudo systemctl start postgresql.service
sudo -u postgres createuser -s runner
- name: Start MariaDB
uses: ankane/setup-mariadb@v1
if: matrix.db == 'mariadb'
- name: Install Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libcurl4-openssl-dev libpython3-dev libssl-dev
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Run Tests
env:
DB: ${{ matrix.db }}
DB_USER: ${{ matrix.db_user }}
DB_PASSWORD: ${{ matrix.db_password }}
SECRET_KEY: dummy-key
run: python manage.py test