From 3f9091c71382b587c3ced769482ec6fe5abd0f7b Mon Sep 17 00:00:00 2001 From: Christoph Brandau Date: Fri, 25 Sep 2026 08:15:30 +0200 Subject: [PATCH] ci: add test workflow to run Python and Node jobs 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. --- .gitea/workflows/tests.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/tests.yml diff --git a/.gitea/workflows/tests.yml b/.gitea/workflows/tests.yml new file mode 100644 index 0000000..518dc82 --- /dev/null +++ b/.gitea/workflows/tests.yml @@ -0,0 +1,39 @@ +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