-
Notifications
You must be signed in to change notification settings - Fork 61
70 lines (60 loc) · 1.95 KB
/
tests.yaml
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
name: Tests Runner
on:
- push
- pull_request
jobs:
test:
name: Run Tests
runs-on: ubuntu-20.04
env:
ALLOWED_HOSTS: '*'
AWS_ACCESS_KEY_ID: 'a secret to everybody'
AWS_SECRET_ACCESS_KEY: 'a secret to everybody'
DATABASE_SSL_REQUIRE: 'off'
DJSTRIPE_WEBHOOK_SECRET: 'whsec_asecrettoeverybody'
DJSTRIPE_WEBHOOK_VALIDATION: ''
HASHID_FIELD_SALT: 'a secret to everybody'
IS_SECURE: 'off'
SECRET_KEY: 'a secret to everybody'
SECURE_SSL_REDIRECT: 'off'
SENDGRID_API_KEY: 'a secret to everybody'
SENTRY_ENABLED: 'off'
SENTRY_DSN: 'dsn_example'
STRIPE_LIVE_MODE: 'off'
STRIPE_LIVE_SECRET_KEY: 'sk_live_asecrettoeverybody'
STRIPE_TEST_SECRET_KEY: 'sk_test_asecrettoeverybody'
STRIPE_TEST_PUBLISHABLE_KEY: 'pk_test_asecrettoeverybody'
steps:
- name: Get the code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: 'requirements*.txt'
- name: Install packages
run: |
# Graphviz support
# python3-dev graphviz libgraphviz-dev
sudo apt install \
python3-dev graphviz libgraphviz-dev
- name: Install packages
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Fake build the site.css
run: touch static/site.css
- name: Check types
run: make mypy
- name: Test it
run: make coverage
- name: Check deploy configuration
run: ./manage.py check --deploy --fail-level WARNING
env:
DATABASE_URL: 'sqlite://:memory:'
SECRET_KEY: 'zt(6jlr#oquxm2t%ryh#n+-72p^(3knbf&q$5x16#o%1im-s7!'
SECURE_SSL_REDIRECT: 'on'
- name: Check documentation build
run: make -C docs html