-
Notifications
You must be signed in to change notification settings - Fork 6
75 lines (63 loc) · 1.95 KB
/
backend.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Back-end CI
on:
push:
branches: [master]
pull_request:
defaults:
run:
working-directory: backend
env:
DJANGO_SETTINGS_MODULE: metagrid.config.local
DOMAIN_NAME: http://localhost:8000
CORS_ORIGIN_WHITELIST: http://localhost:3000
KEYCLOAK_URL: http://keycloak:8080/auth
KEYCLOAK_REALM: metagrid
KEYCLOAK_CLIENT_ID: backend
DATABASE_URL: pgsql://postgres:postgres@localhost:5432/postgres
REACT_APP_ESGF_NODE_URL: https://esgf-node.llnl.gov/esg-search/search
REACT_APP_WGET_API_URL: https://greyworm1-rh7.llnl.gov/wget
REACT_APP_ESGF_NODE_STATUS_URL: https://aims4.llnl.gov/prometheus/api/v1/query?query=probe_success%7Bjob%3D%22http_2xx%22%2C+target%3D~%22.%2Athredds.%2A%22%7D
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.6
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
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@v2
with:
python-version: 3.9
- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('**/local.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/local.txt
- name: Run Tests
run: |
pytest
- name: Upload Coverage Report
uses: codecov/codecov-action@v1
with:
file: "./backend/coverage.xml"
flags: backend
fail_ci_if_error: true