-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to use common CD/CI actions
- Loading branch information
1 parent
fc007f8
commit 70842db
Showing
2 changed files
with
17 additions
and
119 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
name: CI | ||
name: ci/cd | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
|
@@ -9,61 +10,15 @@ on: | |
- 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 . | ||
- name: Run ruff check | ||
run: uv run ruff check . | ||
- name: Run codespell | ||
run : uv run codespell . | ||
|
||
tests: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET Core SDK | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.x | ||
- name: Restore dotnet tools | ||
run: dotnet tool restore | ||
- name: Setup Bonsai | ||
working-directory: bonsai | ||
run: .\Setup.ps1 | ||
|
||
- uses: astral-sh/setup-uv@v3 | ||
with: | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
run: uv python install | ||
|
||
|
||
- 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) | ||
python-linting: | ||
uses: AllenNeuralDynamics/Aind.Behavior.GitHubActions/.github/workflows/python-linting.yml@main | ||
with: | ||
runs-on: ubuntu-latest | ||
|
||
aind-behavior-framework-testing: | ||
uses: AllenNeuralDynamics/Aind.Behavior.GitHubActions/.github/workflows/test-aind-behavior-framework.yml@main | ||
with: | ||
python-version-path: .python-version | ||
run-coverage: false | ||
run-schema: true |
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