feat(double-check): Allow validation of imported annotations [ADEV-10] #650
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
name: Continuous integration | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
backend-tests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "postgres" | |
POSTGRES_DB: "postgres" | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- name: Set up poetry cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pypoetry/ | |
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Run Django tests | |
run: | | |
poetry run ./manage.py test | |
- name: Run coverage | |
run: | | |
poetry run coverage run ./manage.py test &> /dev/null | |
poetry run coverage report | |
- name: Check for missed migrations (don't forget to run makemigrations) | |
run: | | |
if [ "$(poetry run ./manage.py makemigrations --dry-run)" != "No changes detected" ]; then exit 1; fi | |
- name: Check whether seeding still works | |
run: | | |
poetry run ./manage.py migrate | |
poetry run ./manage.py seed | |
- name: Check for missed black (don't forget to run black) | |
run: | | |
poetry run black --check backend | |
- name: Check for missed pylint warnings (don't forget to run pylint) | |
run: | | |
poetry run pylint --disable=fixme backend | |
frontend-tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node.js 16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: Set up npm cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-npm- | |
- name: Install dependencies | |
run: npm install |