Skip to content

Revert "Fix the bulk annotation API username normalization" #737

Revert "Fix the bulk annotation API username normalization"

Revert "Fix the bulk annotation API username normalization" #737

Workflow file for this run

name: Continuous integration
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '.cookiecutter/*'
- '.gitignore'
- 'HACKING.md'
- 'LICENSE'
workflow_call:
env:
TOX_PARALLEL_NO_SPINNER: 1
PYTEST_ADDOPTS: --exitfirst
jobs:
backend:
name: Backend
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.5-alpine
ports:
- 5432:5432
elasticsearch:
image: hypothesis/elasticsearch:latest
ports:
- 9200:9200
env:
discovery.type: single-node
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install tox
run: python -m pip install 'tox<4'
- name: Create test databases
run: psql -U postgres -h localhost -p 5432 -c 'CREATE DATABASE htest'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
path: |
.tox/lint
.tox/checkformatting
.tox/tests
.tox/coverage
key: ${{ runner.os }}-tox-backend-${{ hashFiles('tox.ini', 'requirements/**', 'setup.py', 'setup.cfg') }}
- name: Run tox
run: tox --parallel auto -e checkformatting,tests,coverage,lint
functests:
name: Functional tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11.5-alpine
ports:
- 5432:5432
elasticsearch:
image: hypothesis/elasticsearch:latest
ports:
- 9200:9200
env:
discovery.type: single-node
rabbitmq:
image: rabbitmq:3.6-management-alpine
ports:
- 5672:5672
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version-file: '.python-version'
- name: Update pip
run: python -m pip install --upgrade pip
- name: Install tox
run: python -m pip install 'tox<4'
- name: Create test databases
run: psql -U postgres -h localhost -p 5432 -c 'CREATE DATABASE htest'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
path: |
.tox/functests
key: ${{ runner.os }}-tox-functests-${{ hashFiles('tox.ini', 'requirements/**', 'setup.py', 'setup.cfg') }}
- name: Cache the node_modules dir
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: npm install
run: npm install
- name: gulp build
run: gulp build
- name: Run tox
# Note we run the func tests backwards here to prove there are no order
# dependent tests
run: tox -e functests -- tests/functional --reverse
frontend:
name: Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache the node_modules dir
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Format
run: make frontend-checkformatting
- name: Lint
run: make frontend-lint
- name: Test
run: gulp test