added dark mode for InputFile #1539
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: Verify | |
# https://github.com/reviewdog/action-eslint/issues/29#issuecomment-985939887 | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
# Prevent multiple workflows with same branch/pull_request. | |
concurrency: | |
group: ${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
job_verify_backend: | |
name: Verify backend | |
if: ${{ !github.event.pull_request.draft }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./backend | |
env: | |
PIPENV_VENV_IN_PROJECT: 1 | |
ENV: development | |
SECRET_KEY: NOT SET | |
DJANGO_SETTINGS_MODULE: root.settings | |
DJANGO_SUPERUSER_USERNAME: admin | |
DJANGO_SUPERUSER_PASSWORD: Django123 | |
DJANGO_SUPERUSER_EMAIL: [email protected] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11.0' # From file: '.python-version' | |
- name: Install dependencies | |
run: | | |
python -V | |
PY=$(which python) | |
echo $PY | |
python -m pip install --upgrade pip | |
python -m pip install pipenv | |
python -m pipenv install --dev --deploy --python $PY | |
- name: Check yapf | |
run: python -m pipenv run yapf --parallel --recursive --diff . | |
- name: Verify migrations | |
run: | | |
python -m pipenv run python manage.py makemigrations --check --dry-run --noinput --verbosity 2 | |
python -m pipenv run python manage.py migrate --verbosity 2 | |
- name: Run tests | |
run: python -m pipenv run pytest | |
- name: Run bandit | |
run: python -m pipenv run bandit --recursive --ini .bandit . | |
- name: Run flake8 | |
run: python -m pipenv run flake8 --config=.flake8 . | |
- name: Run mypy | |
run: python -m pipenv run mypy --config-file mypy.ini . | |
- name: Run seeds | |
run: python -m pipenv run python manage.py seed | |
job_verify_docker: | |
name: Verify docker | |
if: ${{ !github.event.pull_request.draft }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup environment | |
run: | | |
touch backend/.docker.env | |
echo ENV=development >> backend/.docker.env | |
echo SECRET_KEY=NOT_SET >> backend/.docker.env | |
echo DJANGO_SETTINGS_MODULE=root.settings >> backend/.docker.env | |
echo DOMAIN=* >> backend/.docker.env | |
touch frontend/.env.docker | |
echo VITE_GOATCOUNTER_CODE=samfundet-dev >> frontend/.env.docker | |
echo VITE_BACKEND_DOMAIN=http://backend:8000 >> frontend/.env.docker | |
echo VITE_CYPRESS_BACKEND_DOMAIN=http://backend:8000 >> frontend/.env.docker | |
echo VITE_CYPRESS_BASE_URL=http://frontend:3000 >> frontend/.env.docker | |
- name: Build images | |
run: docker compose build | |
- name: Start containers | |
run: docker compose up -d; sleep 20 # Give additional seconds to boot. | |
- name: Check running containers | |
# Will fail if container isn't running. | |
run: | | |
docker compose exec backend echo | |
docker compose exec frontend echo | |
docker compose exec storybook echo | |
- name: Seed backend for Cypress tests | |
run: docker compose exec backend pipenv run python manage.py seed_cypress | |
# - name: Run cypress | |
# run: docker compose up cypress | |
- name: Stop containers | |
run: docker compose down | |
job_verify_frontend_lint: | |
name: Verify frontend | |
if: ${{ !github.event.pull_request.draft }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install modules | |
run: yarn install | |
- name: Run ESLint | |
run: yarn run eslint:check | |
- name: Run stylelint | |
run: yarn run stylelint:check | |
- name: Run typescript compiler check | |
run: yarn run tsc:check |