Skip to content

Update django.yml

Update django.yml #12

Workflow file for this run

name: Django CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
environment: dev
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
cd dev_tool/tests/
npm install
cd ../../
- name: Run Backend Tests
env:
OIDC_RP_CLIENT_ID: ${{ secrets.OIDC_RP_CLIENT_ID }}
OIDC_RP_CLIENT_SECRET: ${{ secrets.OIDC_RP_CLIENT_SECRET }}
EBRAINS_USERNAME: ${{ secrets.EBRAINS_USERNAME }}
EBRAINS_PASSWORD: ${{ secrets.EBRAINS_PASSWORD }}
NSG_USERNAME: ${{ secrets.NSG_USERNAME }}
NSG_PASSWORD: ${{ secrets.NSG_PASSWORD }}
FERNET_KEY: ${{ secrets.FERNET_KEY }}
NSG_KEY: ${{ secrets.NSG_KEY }}
MODEL_CATALOG_USERNAME: ${{ secrets.MODEL_CATALOG_USERNAME }}
MODEL_CATALOG_PASSWORD: ${{ secrets.MODEL_CATALOG_PASSWORD }}
run: |
python manage.py migrate
python manage.py migrate --run-syncdb
python manage.py test
- name: Run Frontend Tests
env:
OIDC_RP_CLIENT_ID: ${{ secrets.OIDC_RP_CLIENT_ID }}
OIDC_RP_CLIENT_SECRET: ${{ secrets.OIDC_RP_CLIENT_SECRET }}
EBRAINS_USERNAME: ${{ secrets.EBRAINS_USERNAME }}
EBRAINS_PASSWORD: ${{ secrets.EBRAINS_PASSWORD }}
NSG_USERNAME: ${{ secrets.NSG_USERNAME }}
NSG_PASSWORD: ${{ secrets.NSG_PASSWORD }}
FERNET_KEY: ${{ secrets.FERNET_KEY }}
NSG_KEY: ${{ secrets.NSG_KEY }}
MODEL_CATALOG_USERNAME: ${{ secrets.MODEL_CATALOG_USERNAME }}
MODEL_CATALOG_PASSWORD: ${{ secrets.MODEL_CATALOG_PASSWORD }}
run: |
python manage.py runserver
cd dev_tool/tests/
npm test