Skip to content

ci(test): add PR workflow, Jest setup, and env examples #2

ci(test): add PR workflow, Jest setup, and env examples

ci(test): add PR workflow, Jest setup, and env examples #2

Workflow file for this run

name: PR Tests
on: pull_request
permissions:
contents: read
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true
jobs:
node-tests:
name: Node.js tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: apps/backend/package-lock.json
- name: Install deps
run: npm ci
working-directory: apps/backend
- name: Run tests
run: npm test -- --ci
working-directory: apps/backend
python-tests:
name: Python tests (lemmas)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install -r apps/lemmas/requirements.txt
pip install pytest
python -m spacy download de_core_news_md
- name: Run pytest
run: pytest -q apps/lemmas