-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (56 loc) · 1.96 KB
/
ci.yml
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
name: CI Liionsden
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
workflow_call:
jobs:
check-links:
uses: ./.github/workflows/check-links.yml
test:
runs-on: ubuntu-latest
env:
ADMIN_PASSWORD: password
AZURE_STORAGE_CONTAINER: test
AZURE_STORAGE_ACCOUNT_NAME: devstoreaccount1
AZURE_STORAGE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;QueueEndpoint=http://localhost:10001/devstoreaccount1;
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
azurite:
image: mcr.microsoft.com/azure-storage/azurite:3.32.0
ports:
- 10000:10000
- 10001:10001
- 10002:10002
options: --health-cmd "nc -z 127.0.0.1 10000"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: requirements*.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements-dev.txt
- name: Run migrations
run: python manage.py migrate
- name: Create storage container
run: python manage.py createstoragecontainer
- name: Run tests
env:
AZURE_STORAGE_ACCOUNT_KEY: "${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}"
PRIVACY_NOTICE_SAS_URL: "${{ secrets.PRIVACY_NOTICE_SAS_URL }}"
run: python manage.py test