chore: use local tree-sitter-cli in all commands #482
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: test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| pytest: | |
| runs-on: ${{ matrix.os }}-latest | |
| env: | |
| PYTEST_ADDOPTS: "--color=yes" | |
| strategy: | |
| matrix: | |
| os: [ubuntu, macos] | |
| python-version: ['3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Checkout the repository and submodules | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install rsm-lang | |
| run: | | |
| uv sync | |
| uv pip list | |
| - name: Run unit tests | |
| run: | | |
| uv run pytest -vv -m "not visual and not accessibility and not interactive" | |
| - name: Run doctests in source files | |
| run: | | |
| uv run pytest -vv --doctest-modules rsm | |
| - name: Run doctests in doc files | |
| run: | | |
| cd docs && uv run make doctest | |
| pandoc-tests: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTEST_ADDOPTS: "--color=yes" | |
| steps: | |
| - name: Checkout the repository and submodules | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install rsm-lang | |
| run: uv sync | |
| - name: Install pandoc | |
| run: sudo apt-get install -y pandoc | |
| - name: Run pandoc tests | |
| run: uv run pytest -vv tests/test_pandoc.py | |
| visual-tests: | |
| runs-on: macos-latest | |
| timeout-minutes: 15 | |
| env: | |
| PYTEST_ADDOPTS: "--color=yes" | |
| steps: | |
| - name: Checkout the repository and submodules | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install rsm-lang | |
| run: | | |
| uv sync | |
| uv pip list | |
| - name: Install Playwright browsers | |
| run: | | |
| uv run playwright install --with-deps chromium | |
| - name: Run visual tests | |
| run: | | |
| uv run pytest -vv -m visual -n 2 --timeout=60 | |
| interactive-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| PYTEST_ADDOPTS: "--color=yes" | |
| steps: | |
| - name: Checkout the repository and submodules | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install rsm-lang | |
| run: uv sync | |
| - name: Install Playwright browsers | |
| run: uv run playwright install --with-deps chromium | |
| - name: Run interactive tests | |
| run: uv run pytest tests/interactive/ -vv --browser chromium --timeout=60 | |
| accessibility-tests: | |
| runs-on: macos-latest | |
| timeout-minutes: 15 | |
| env: | |
| PYTEST_ADDOPTS: "--color=yes" | |
| steps: | |
| - name: Checkout the repository and submodules | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install rsm-lang | |
| run: | | |
| uv sync | |
| uv pip list | |
| - name: Install Playwright browsers | |
| run: | | |
| uv run playwright install --with-deps chromium | |
| - name: Run accessibility tests | |
| run: | | |
| uv run pytest -vv -m accessibility -n 2 --timeout=180 |