-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (55 loc) · 1.83 KB
/
pr.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
name: 'Pull Request'
on:
push:
branches-ignore:
- 'staging'
- 'master'
env:
ENVIRONMENT: local
SECRET: ${{ secrets.SECRET }}
DEBUG: 0
ALLOWED_HOSTS: 127.0.0.1,localhost
DOMAIN_URL: http://localhost:8080/
EMAIL_ENGINE: local
EMAIL_FILE_PATH: ${GITHUB_WORKSPACE}/emails
HIGHCHART_SERVER: https://highcharts-export.osc-fr1.scalingo.io
POSTGRES_DB: postgres
CELERY_BROKER_URL: null
CELERY_RESULT_BACKEND: null
CELERY_TASK_ALWAYS_EAGER: null
API_KEY_SENDINBLUE: null
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_LOCATION: ${{ secrets.AWS_LOCATION }}
AWS_S3_REGION_NAME: ${{ secrets.AWS_S3_REGION_NAME }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_STORAGE_BUCKET_NAME: ${{ secrets.AWS_STORAGE_BUCKET_NAME }}
CRISP_WEBHOOK_SECRET_KEY: ${{ secrets.CRISP_WEBHOOK_SECRET_KEY }}
CRISP_WEBSITE_ID: ${{ secrets.CRISP_WEBSITE_ID }}
AWS_S3_ENDPOINT_URL: ${{ secrets.AWS_S3_ENDPOINT_URL }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/[email protected]
env:
SKIP: ggshield,sqlfluff-lint,sqlfluff-fix
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pipenv'
- run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- uses: nyurik/action-setup-postgis@v1
id: pg
- run: psql -c "ALTER ROLE postgres SUPERUSER;"
- run: pipenv install --dev
- run: sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
- run: sudo apt-get update
- run: sudo apt-get install -y gdal-bin libgdal-dev
- run: pipenv run python -Wa manage.py test
env:
DATABASE_URL: ${{ steps.pg.outputs.connection-uri }}