-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (43 loc) · 1.15 KB
/
pytest.yml
File metadata and controls
50 lines (43 loc) · 1.15 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
name: Pytest
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
env:
DEBUG: 0
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
IS_GITHUB_WORKFLOW: 1
OSU_CLIENT_ID: 727
OSU_CLIENT_SECRET: wysi
OSU_CLIENT_REDIRECT_URI: aireu
PGDATABASE: otdb
PGUSER: otdb
PGPASSWORD: otdb
PGHOST: localhost
PGPORT: 5432
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Start postgresql
shell: bash
run: |
sudo systemctl start postgresql.service
sudo -u postgres psql --command="CREATE USER otdb WITH SUPERUSER CREATEDB PASSWORD 'otdb'" --command="\du"
sudo -u postgres createdb --owner=otdb otdb
- name: Django migrations
working-directory: ./otdb
run: |
python manage.py migrate
- name: Test with pytest
working-directory: ./otdb
run: |
pytest