Skip to content

SC-18&19&20 Order models and endpoints. Account endpoints (#19) #74

SC-18&19&20 Order models and endpoints. Account endpoints (#19)

SC-18&19&20 Order models and endpoints. Account endpoints (#19) #74

Workflow file for this run

name: Backend and Frontend CI testing
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-frontend:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
defaults:
run:
working-directory: ./webapp
steps:
- name: Chekout the repository
uses: actions/checkout@v4
with:
sparse-checkout: ./webapp
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ./webapp/package-lock.json
- name: Install packages
run: npm ci
- name: Build project
run: npm run build
- name: Run tests
run: npm test
build-backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
env:
DJANGO_API_KEY: EMPTY_KEY
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: ./backend
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Import requirements
run: pip install -r requirements.txt
- name: Check migrations
run: python manage.py migrate
- name: Run django tests
run: python manage.py test