-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from epics-extensions/github-nix-build
add Nix build as GitHub action
- Loading branch information
Showing
3 changed files
with
35 additions
and
4 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
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,22 @@ | ||
name: "Nix build" | ||
|
||
permissions: read-all | ||
|
||
on: | ||
# Allows running this workflow manually | ||
workflow_dispatch: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
nix-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v24 | ||
- uses: DeterminateSystems/magic-nix-cache-action@v2 | ||
with: | ||
diagnostic-endpoint: "" | ||
- name: Run `nix build` | ||
run: nix build -L . |
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,16 +1,24 @@ | ||
name: "Check Formatting" | ||
name: "Ruff lints" | ||
|
||
permissions: read-all | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v20 | ||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v40 | ||
with: | ||
files: | | ||
**.py | ||
- uses: cachix/install-nix-action@v24 | ||
- name: "Check Ruff lints" | ||
run: nix run 'nixpkgs#ruff' -- check . --output-format=github | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: nix run 'nixpkgs#ruff' -- check . --output-format=github ${{ steps.changed-files.outputs.all_changed_files }} |