-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (52 loc) · 2.38 KB
/
test.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
name: Testing
on: [push]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_github_actions
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
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
- name: install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r config/requirements/local.txt
- name: Run migrations
run: ./manage.py migrate
- name: django testing
env: # Set the secret as an input
APPLE_WALLET_CERTIFICATE: ${{ secrets.APPLE_WALLET_CERTIFICATE }}
APPLE_WALLET_KEY: ${{ secrets.APPLE_WALLET_KEY }}
APPLE_WALLET_PASSWORD: ${{ secrets.APPLE_WALLET_PASSWORD }}
APPLE_WALLET_PASS_TYPE_ID: ${{ secrets.APPLE_WALLET_PASS_TYPE_ID }}
APPLE_WALLET_TEAM_ID: ${{ secrets.APPLE_WALLET_TEAM_ID }}
APPLE_WALLET_WWDR_CERTIFICATE: ${{ secrets.APPLE_WALLET_WWDR_CERTIFICATE }}
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}
GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}
GOOGLE_WALLET_CLIENT_CERT_URL: ${{ secrets.GOOGLE_WALLET_CLIENT_CERT_URL }}
GOOGLE_WALLET_CLIENT_EMAIL: ${{ secrets.GOOGLE_WALLET_CLIENT_EMAIL }}
GOOGLE_WALLET_CLIENT_ID: ${{ secrets.GOOGLE_WALLET_CLIENT_ID }}
GOOGLE_WALLET_ISSUER_ID: ${{ secrets.GOOGLE_WALLET_ISSUER_ID }}
GOOGLE_WALLET_PRIVATE_KEY: ${{ secrets.GOOGLE_WALLET_PRIVATE_KEY }}
GOOGLE_WALLET_PRIVATE_KEY_ID: ${{ secrets.GOOGLE_WALLET_PRIVATE_KEY_ID }}
GOOGLE_WALLET_PROJECT_ID: ${{ secrets.GOOGLE_WALLET_PROJECT_ID }}
MORALIS_API_KEY: ${{ secrets.MORALIS_API_KEY }}
ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }}
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }}
run: |
./manage.py test --settings=config.settings.test --failfast --keepdb