-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (45 loc) · 1.61 KB
/
quality-assurance.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
name: Quality Assurance
on: [pull_request]
jobs:
quality-assurance:
name: Quality Assurance
# TODO(dmu) LOW: Consider using Debian Buster (the same as docker image is based on) if it is easy to do
runs-on: ubuntu-latest
container: python:3.10.4
services:
# TODO(dmu) LOW: This section duplicates services already defined in `docker-compose.yml`.
# Is there a way to make it DRY?
db:
image: postgres:16.2-alpine
env:
POSTGRES_DB: thenewboston
POSTGRES_USER: thenewboston
POSTGRES_PASSWORD: thenewboston
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:6.2.6-alpine
steps:
# TODO(dmu) LOW: Implement caching
- uses: actions/checkout@v4
- name: Run Poetry image
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.8.3
- name: Disable "dubious ownership" errors
# This allows us to install pre-commit
run: git config --global --add safe.directory '*'
- name: Install
run: make install && make install-pre-commit
- name: Lint
run: make lint
- name: Test
run: make test
env:
THENEWBOSTON_SETTING_DATABASES: '{"default":{"HOST":"db"}}'
THENEWBOSTON_SETTING_CHANNEL_LAYERS: '{"default":{"CONFIG":{"hosts":[["redis", 6379]]}}}'
THENEWBOSTON_SETTING_CELERY_RESULT_BACKEND: redis://redis:6379/0
THENEWBOSTON_SETTING_CELERY_BROKER_URL: redis://redis:6379/0