mirror of
https://github.com/Smaug123/AdventOfCode2022
synced 2025-10-10 20:18:41 +00:00
Exercise Nix build in workflow (#46)
This commit is contained in:
29
.github/workflows/dotnet.yaml
vendored
29
.github/workflows/dotnet.yaml
vendored
@@ -38,14 +38,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v17
|
||||
- name: Build
|
||||
run: nix build
|
||||
- name: Run app
|
||||
run: dotnet run --project AdventOfCode2022.App/AdventOfCode2022.App.fsproj --configuration Release
|
||||
run: ./result/bin/AdventOfCode2022.App
|
||||
|
||||
check-format:
|
||||
check-dotnet-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -59,13 +59,26 @@ jobs:
|
||||
- name: Run Fantomas
|
||||
run: ./hooks/pre-push
|
||||
|
||||
check-nix-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v17
|
||||
- name: Run Alejandra
|
||||
run: nix develop --command alejandra --check .
|
||||
|
||||
shellcheck:
|
||||
name: Shellcheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v17
|
||||
- name: Run ShellCheck
|
||||
uses: ludeeus/action-shellcheck@master
|
||||
run: nix shell 'nixpkgs#shellcheck' --command bash -c "find . -type f -name '*.sh' | xargs shellcheck"
|
||||
|
||||
linkcheck:
|
||||
name: Check links
|
||||
@@ -76,7 +89,7 @@ jobs:
|
||||
name: Run link checker
|
||||
|
||||
all-required-checks-complete:
|
||||
needs: [check-format, build, shellcheck, linkcheck, run-app]
|
||||
needs: [check-dotnet-format, check-nix-format, build, shellcheck, linkcheck, run-app]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo "All required checks complete."
|
||||
|
Reference in New Issue
Block a user