Files
AdventOfCode2022/.github/workflows/dotnet.yaml
Patrick Stevens c4be907aa7 Day 16 (#26)
2022-12-17 01:15:56 +00:00

83 lines
1.9 KiB
YAML

name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
build:
strategy:
matrix:
config:
- Release
- Debug
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration ${{matrix.config}}
- name: Test
run: dotnet test --no-build --verbosity normal --configuration ${{matrix.config}}
run-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Run app
run: dotnet run --project AdventOfCode2022.App/AdventOfCode2022.App.fsproj --configuration Release
check-format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET SDK v7.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Prepare .NET tools
run: dotnet tool restore
- name: Run Fantomas
run: ./hooks/pre-push
shellcheck:
name: Shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
linkcheck:
name: Check links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
name: Run link checker
all-required-checks-complete:
needs: [check-format, build, shellcheck, linkcheck, run-app]
runs-on: ubuntu-latest
steps:
- run: echo "All required checks complete."