Skip to content

Maintenance

Maintenance #291

Workflow file for this run

name: tests
on:
push:
paths-ignore:
- "README.md"
- ".gitignore"
- "static/**"
pull_request:
branches:
- master
paths-ignore:
- "README.md"
- ".gitignore"
- "static/**"
jobs:
tests:
strategy:
matrix:
test_type:
- BLITZ
- CLASSIC
runs-on: "ubuntu-22.04"
timeout-minutes: 15
env:
TEST: 1
TEST_TYPE: ${{ matrix.test_type }}
PYTHONUNBUFFERED: 1
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: |
cli/requirements.txt
tests/requirements.txt
backend/requirements.txt
- name: Install requirements
run: |
pip install -r cli/requirements.txt
pip install -r tests/requirements.txt
pip install -r backend/requirements.txt
- name: Setup tests
run: python tests/setup_forcad.py
- name: Setup ForcAD
run: ./control.py setup
- name: Build ForcAD
run: ./control.py build
- name: Start & run tests
run: |
export $(find ./docker_config -name "*.env" -exec egrep -v '^#' {} \; | xargs)
./control.py start
docker ps
docker compose ps
docker compose logs -f initializer
python tests/wait_for_start.py
./control.py rd ps
env | sort
python -m unittest discover -v -s tests
- name: Show logs
if: ${{ failure() }}
run: ./control.py rd logs --tail 2000
backend_linter:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: pip install flake8
- name: Run linters
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
flake8: true
frontend_linter:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node 16
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install dependencies
working-directory: front
run: yarn install
- name: Run linters
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_fix: true
eslint: true
prettier: true
eslint_dir: front/src
prettier_dir: front/src
- name: Check the frontend compiles
working-directory: front
run: yarn build