Display amount of items in dashboard filters #6822
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: CI | |
on: | |
push: | |
paths-ignore: | |
- '.cookiecutter/*' | |
- '.github/dependabot.yml' | |
- '.github/workflows/deploy.yml' | |
- '.github/workflows/redeploy.yml' | |
- 'bin/logger' | |
- 'bin/make_python' | |
- 'bin/make_template' | |
- 'conf/development.ini' | |
- 'conf/production.ini' | |
- 'conf/supervisord*.conf' | |
- 'docs/*' | |
- 'requirements/*.in' | |
- 'requirements/dev.txt' | |
- '.docker.env' | |
- '**/.gitignore' | |
- 'Dockerfile' | |
- 'LICENSE' | |
- '*.md' | |
- 'docker-compose.yml' | |
workflow_dispatch: | |
workflow_call: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
Format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Cache the .tox dir | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: format-${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*') }} | |
restore-keys: | | |
format-${{ runner.os }}-tox- | |
- run: python -m pip install 'tox<4' | |
- run: tox -e checkformatting | |
Lint: | |
runs-on: ubuntu-latest-32-cores | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Cache the .tox dir | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: lint-${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*') }} | |
restore-keys: | | |
lint-${{ runner.os }}-tox- | |
- run: python -m pip install 'tox<4' | |
- run: tox -e lint | |
Typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Cache the .tox dir | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: typecheck-${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*') }} | |
restore-keys: | | |
typecheck-${{ runner.os }}-tox- | |
- run: python -m pip install 'tox<4' | |
- run: tox -e typecheck | |
Tests: | |
runs-on: ubuntu-latest-32-cores | |
services: | |
postgres: | |
image: postgres:15.6-alpine | |
ports: | |
- 5433:5432 | |
env: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Cache the .tox dir | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: tests-${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*') }} | |
restore-keys: | | |
tests-${{ runner.os }}-tox- | |
- name: Create test database | |
run: psql -U postgres -h localhost -p 5433 -c 'CREATE DATABASE lms_tests' | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: python -m pip install 'tox<4' | |
- run: tox -e tests | |
env: | |
COVERAGE_FILE: .coverage.${{ matrix.python-version }} | |
- name: Upload coverage file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: .coverage.* | |
include-hidden-files: true | |
Coverage: | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Cache the .tox dir | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: coverage-${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*') }} | |
restore-keys: | | |
coverage-${{ runner.os }}-tox- | |
- name: Download coverage files | |
uses: actions/download-artifact@v4 | |
with: | |
name: coverage | |
- run: python -m pip install 'tox<4' | |
- run: tox -e coverage | |
Functests: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15.6-alpine | |
ports: | |
- 5433:5432 | |
env: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Cache the .tox dir | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: functests-${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*') }} | |
restore-keys: | | |
functests-${{ runner.os }}-tox- | |
- name: Create test database | |
run: psql -U postgres -h localhost -p 5433 -c 'CREATE DATABASE lms_functests' | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: python -m pip install 'tox<4' | |
- run: tox -e functests | |
Frontend: | |
uses: ./.github/workflows/frontend.yml | |
BDD_Tests: | |
name: BDD Tests | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:15.6-alpine | |
ports: | |
- 5433:5432 | |
env: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Cache the .tox dir | |
uses: actions/cache@v3 | |
with: | |
path: .tox | |
key: bddtests-${{ runner.os }}-tox-${{ hashFiles('tox.ini') }}-${{ hashFiles('requirements/*') }} | |
restore-keys: | | |
bddtests-${{ runner.os }}-tox- | |
- name: Create test database | |
run: psql -U postgres -h localhost -p 5433 -c 'CREATE DATABASE lms_bddtests' | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: python -m pip install 'tox<4' | |
- run: tox -e bddtests |