Skip to content

refactor: AnnoDialog (SCE-34) #3987

refactor: AnnoDialog (SCE-34)

refactor: AnnoDialog (SCE-34) #3987

Workflow file for this run

name: Push Tests
on:
push:
branches:
- main
pull_request:
branches:
- "**"
env:
JEST_ENV: prod
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git fetch --depth=1 origin +${{github.base_ref}}
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Node cache
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run pre-commit checks
uses: pre-commit/action@v3.0.0
- name: Install client dependencies
run: |
cd client
npm install
- name: Lint src with eslint
working-directory: ./client
run: |
npm run lint
- name: Install dev dependencies
run: |
cd server
pip install -r requirements-dev.txt
# We can't have mypy in the pre-commit hook without having it run on all files
# in the repo, because (probably) the --all-files argument in pre-commit overrides
# the more narrow specifying of files in pyproject.toml
# TODO: Remove this if/when all files are mypy-compliant
- name: Run mypy
run: |
mypy --config-file pyproject.toml
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Python cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/setup-node@v4
with:
node-version-file: "client/.nvmrc"
cache: "npm"
cache-dependency-path: "client/package-lock.json"
- name: Install dependencies
run: make dev-env-server build-for-server-dev
- name: Unit tests
run: |
make unit-test-server
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4.2.0
with:
root_dir: ../
flags: server,python,unitTest
verbose: true
commit_parent: false
directory: server/
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}