mirror of
https://github.com/HendrikRauh/dmx-interface.git
synced 2026-03-09 05:20:21 +00:00
Merge pull request #96 from HendrikRauh/idf-add-action
add(actions): added a check.yml
This commit is contained in:
commit
241bcae9fe
2 changed files with 55 additions and 0 deletions
16
.github/actions/install-nix/action.yml
vendored
Normal file
16
.github/actions/install-nix/action.yml
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
name: install-nix
|
||||||
|
description: Install Nix with flakes enabled and pre-warm the repository's flake devShell
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Install Nix (with flakes)
|
||||||
|
uses: cachix/install-nix-action@v31
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
- name: Pre-warm flake devShell
|
||||||
|
run: |
|
||||||
|
# Use the repository's `flake.nix` devShell to fetch dependencies.
|
||||||
|
# This speeds up later `nix develop` invocations in workflow steps.
|
||||||
|
nix develop --command true
|
||||||
|
shell: bash
|
||||||
39
.github/workflows/check.yml
vendored
Normal file
39
.github/workflows/check.yml
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
name: check
|
||||||
|
|
||||||
|
"on":
|
||||||
|
workflow_dispatch: {}
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["**"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Install Nix and pre-warm flake devShell
|
||||||
|
uses: ./.github/actions/install-nix
|
||||||
|
|
||||||
|
- name: Run pre-commit from flake devShell
|
||||||
|
run: |
|
||||||
|
# Use the flake devShell defined in ./flake.nix (x86_64 runner)
|
||||||
|
nix develop --command pre-commit run --all-files
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Install Nix and pre-warm flake devShell
|
||||||
|
uses: ./.github/actions/install-nix
|
||||||
|
|
||||||
|
- name: Run build from flake devShell
|
||||||
|
run: |
|
||||||
|
# Use the flake devShell defined in ./flake.nix (x86_64 runner)
|
||||||
|
nix develop --command invoke build
|
||||||
|
shell: bash
|
||||||
Loading…
Add table
Add a link
Reference in a new issue