Skip to content

[TB 92 and 37]comments_async: update semantics and implement some fixes from a11y test #2110

[TB 92 and 37]comments_async: update semantics and implement some fixes from a11y test

[TB 92 and 37]comments_async: update semantics and implement some fixes from a11y test #2110

Workflow file for this run

name: Django CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Setup Postgres
env:
PGPASSWORD: postgres
PGHOSTADDR: 127.0.0.1
run: |
psql -c 'create database django;' -U postgres
psql -c 'create database django_test;' -U postgres
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache pip packages
uses: actions/cache@v3
env:
cache-name: cache-pip-packages
with:
path: ~/.cache/pip
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/requirements/dev.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
run: |
npm install
pip install -r requirements/dev.txt
pip install coveralls
- name: Run Tests
env:
PGPASSWORD: postgres
PGHOSTADDR: 127.0.0.1
run: |
DJANGO_SETTINGS_MODULE='tests.project.travis' py.test --cov
python manage.py makemigrations --dry-run --check --noinput
isort --diff -c adhocracy4 tests
flake8 adhocracy4 tests --exclude migrations,settings
npm run lint
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.COV }}
run: |
coveralls
- name: Run Frontend Tests
run: |
npm test
- name: Frontend Coverage
uses: artiomtr/jest-coverage-report-action@v2.0-rc.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'pull_request'