[pre-commit.ci] pre-commit autoupdate #125
This file contains hidden or 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: | |
| - '.github/workflows/ci.yml' | |
| - '.pre-commig-config.yaml' | |
| - 'pyproject.toml' | |
| - 'poetry.lock' | |
| - 'src/**.py' | |
| - 'src/syntaxes/**' | |
| - 'test/**' | |
| jobs: | |
| unit-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "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,doc | |
| - name: Test with pytest | |
| run: | | |
| poetry run pytest -v test/unit | |
| regression-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "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,doc | |
| - name: Test with pytest | |
| run: | | |
| poetry run pytest -v test/regression |