Skip to content

Merge pull request #243 from eduNEXT/hpg/content-suggestions #32

Merge pull request #243 from eduNEXT/hpg/content-suggestions

Merge pull request #243 from eduNEXT/hpg/content-suggestions #32

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches:
- "**"
jobs:
test_backend:
name: Backend Tests
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: "./backend"
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
toxenv: [quality, pii_check, django42]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: setup python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install pip
run: pip install -r requirements/pip.txt
- name: Install Dependencies
run: pip install -r requirements/ci.txt
- name: Run Tests
env:
TOXENV: ${{ matrix.toxenv }}
run: tox
- name: Run coverage
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42'
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
working-directory: "./backend"
test_frontend:
name: Frontend Tests
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: "./frontend"
strategy:
matrix:
os: [ubuntu-latest]
node-version: ['20']
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Run linting
run: npm run lint
- name: Run type check
run: npm run types
- name: Run test
run: npm run test
test_plugin:
name: Plugin / Docs Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [ "3.12" ]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: pip install tox
- name: Build documentation
env:
TOXENV: docs
run: tox