Skip to content

[test CI test

[test CI test #8

Workflow file for this run

name: CI
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
jobs:
backend:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: ${{ secrets.DB_USERNAME }}
POSTGRES_PASSWORD: ${{ secrets.DB_USER_PASSWORD }}
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11.0
- name: Setting .env
run: |
echo "ENV=$ENV" >> .env
env:
ENV: ${{secrets.ENV}}
- name: Install dependencies
run: |
cd backend
pip install -r requirements.txt
- name: Run Django migrations
run: |
cd backend
python manage.py makemigrations
python manage.py migrate
- name: Run Django tests
run: |
cd backend
python manage.py test
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache frontend packages
uses: actions/cache@v3
with:
path: frontend/node_modules
key: ${{ runner.os }}-frontend-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: ${{ runner.os }}-frontend-
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install packages
working-directory: frontend
run: npm ci