move ruff to pre-commit ci, add mypy #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CI" | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '**.py' | |
- '**.yml' | |
- 'test/**' | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v3 | |
- name: Install the project dependencies | |
run: poetry install --without dev | |
- name: Test with pytest | |
run: | | |
poetry run pytest -v test/unit | |
regression-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
node-version: [20] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install node dependencies | |
run: | | |
mkdir test/regression/node_root | |
cp test/regression/index.js test/regression/node_root | |
cd test/regression/node_root | |
npm init -y | |
npm install oniguruma typescript vscode-oniguruma vscode-textmate | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v3 | |
- name: Install the project dependencies | |
run: poetry install --without dev | |
- name: Test with pytest | |
run: | | |
poetry run pytest -v test/regression |