Skip to content

Load frontend config before rendering App #3855

Load frontend config before rendering App

Load frontend config before rendering App #3855

Workflow file for this run

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
DJANGO_SECURE_SSL_REDIRECT: False
CORS_ORIGIN_WHITELIST: http://localhost:3000
KEYCLOAK_URL: https://esgf-login.ceda.ac.uk/
KEYCLOAK_REALM: esgf
KEYCLOAK_CLIENT_ID: metagrid-localhost
DATABASE_URL: pgsql://postgres:postgres@localhost:5432/postgres
REACT_APP_SEARCH_URL: https://esgf-node.llnl.gov/esg-search/search
REACT_APP_WGET_API_URL: https://esgf-node.llnl.gov/esg-search/wget
REACT_APP_ESGF_NODE_STATUS_URL: https://aims2.llnl.gov/metagrid-backend/proxy/status
REACT_APP_ESGF_SOLR_URL: https://esgf-fedtest.llnl.gov/solr
DJANGO_LOGIN_REDIRECT_URL: http://localhost:3000/search
DJANGO_LOGOUT_REDIRECT_URL: http://localhost:3000/search
GLOBUS_CLIENT_KEY: ${{ secrets.GLOBUS_KEY }}
GLOBUS_CLIENT_SECRET: ${{ secrets.GLOBUS_SECRET }}
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.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@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Cache pip
uses: actions/cache@v4
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 setuptools
pip install -r requirements/local.txt
- name: Run Tests
run: |
pytest
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: "./backend/coverage.xml"
flags: backend