Categorize configs #969
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runs frontend and backend tests on every pull request and when pull request is pushed to main | |
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build_back: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Install Poetry | |
run: | | |
cd recommender-back | |
pip install poetry | |
- name: Update Poetry | |
run: | | |
cd recommender-back | |
poetry update | |
- name: Install dependencies | |
run: | | |
cd recommender-back | |
poetry install | |
- name: Run backend tests and coverage | |
env: | |
DEVELOPMENT_DB_URI: ${{ secrets.DEVELOPMENT_DB_URI }} | |
run: | | |
cd recommender-back | |
poetry run coverage run --branch -m pytest | |
poetry run coverage xml | |
- name: Coverage report to codecov | |
run: | | |
bash <(curl -s https://codecov.io/bash) | |
- name: Run Pylint | |
run: | | |
cd recommender-back | |
poetry run pylint src --fail-under 8.0 main | |
build_front: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 20.2.0 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.2.0 | |
- name: Install Node | |
run: | | |
cd recommender-front && npm ci | |
- name: Run frontend tests and coverage | |
run: | | |
cd recommender-front && npm test -- --coverage | |
- name: Coverage report to Codecov | |
run: | | |
bash <(curl -s https://codecov.io/bash) | |
- name: Run ESLint | |
run: | | |
cd recommender-front && npm run lint |