Add a Gitea workflow that runs on pull requests and pushes to main. It defines two jobs: - Python: sets up Python 3.12, installs pytest, and runs language-server tests under server/tests/python_tests with PYTHONPATH=libs. - Node: sets up Node 20, installs npm deps (root and client), runs extension tests (node --test test/) and builds the extension (npm run package). Workflow file added at .gitea/workflows/tests.yml.
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Tests
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
jobs:
|
|
python:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install pytest
|
|
run: pip install pytest
|
|
- name: Run language server tests
|
|
working-directory: server
|
|
# The server's dependencies are bundled in server/libs.
|
|
env:
|
|
PYTHONPATH: libs
|
|
run: python -m pytest tests/python_tests -q
|
|
node:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: Install NPM Packages
|
|
run: |
|
|
npm ci
|
|
cd ./client
|
|
npm ci
|
|
- name: Run extension tests
|
|
run: node --test test/
|
|
- name: Build extension
|
|
run: npm run package
|