Debug CI action #166
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: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
linters: | |
runs-on: windows-latest | |
name: Lint ${{ matrix.python-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Set up Python ${{ matrix.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: uv sync --extra dev | |
- name: Run ruff format | |
run: uv run ruff format . --config .\pyproject.toml | |
- name: Run ruff check | |
run: uv run ruff check . --config .\pyproject.toml | |
- name: Run codespell | |
run : uv run codespell . | |
setup-bonsai: | |
runs-on: windows-latest | |
name: Setup Bonsai | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET Core SDK | |
uses: actions/[email protected] | |
with: | |
dotnet-version: 7.x | |
- name: Restore dotnet tools | |
run: dotnet tool restore | |
- name: Setup Bonsai | |
working-directory: bonsai | |
run: .\Setup.ps1 | |
- name: Upload Bonsai Files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bonsai-files | |
path: bonsai | |
tests: | |
runs-on: windows-latest | |
name: Testing ${{ matrix.python-version }} | |
needs: setup-bonsai | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Bonsai Files | |
uses: actions/download-artifact@v3 | |
with: | |
name: bonsai-files | |
path: bonsai-files | |
- name: List all files and directories | |
run: dir /s /b | |
- name: Move Bonsai Files | |
run: | | |
mkdir bonsai | |
move bonsai-files\* bonsai | |
- uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Set up Python ${{ matrix.python-version }} | |
run: uv python install ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: uv sync --extra dev | |
- name: Run tests | |
run: uv run -m unittest | |
- name: Regenerate schemas | |
run: uv run regenerate | |
- name: Check for uncommitted changes | |
run: | | |
git config --global core.safecrlf false | |
git diff --exit-code || (echo "Untracked changes found" && exit 1) |