-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Split Lint & Style from Test workflow
The Lint & Style job needs to run on all PRs, not only when something "test" related changes. Otherwise not all workflow, nix or other files are style-checked and linted.
- Loading branch information
1 parent
e6cde92
commit d6153be
Showing
3 changed files
with
39 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Check | ||
|
||
on: | ||
workflow_call: | ||
secrets: | ||
CACHIX_AUTH_TOKEN: | ||
required: false | ||
pull_request: | ||
branches: | ||
- main | ||
- v[0-9]+ | ||
|
||
concurrency: | ||
# Terminate all previous runs of the same workflow for pull requests | ||
group: style-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-style: | ||
name: Lint & Style | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Nix Environment | ||
uses: ./.github/actions/setup-nix | ||
with: | ||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | ||
tools: style | ||
- name: Run linter (check locally with `nix-shell --run postgrest-lint`) | ||
run: postgrest-lint | ||
- name: Run style check (auto-format with `nix-shell --run postgrest-style`) | ||
run: postgrest-style-check |
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
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