Skip to content

Update all

Update all #2978

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
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.16
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