From 801afe2285a2ca1e38a84641d227097a0ff62283 Mon Sep 17 00:00:00 2001 From: dninemfive <11084010+dninemfive@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:02:40 -0700 Subject: [PATCH 1/3] Add .NET continuous integration --- .github/workflows/dotnet.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..217f7cb --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,28 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal From a2ceb0a72b05599075b71c7ccbc5c04fb3f73f7f Mon Sep 17 00:00:00 2001 From: dninemfive <11084010+dninemfive@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:07:46 -0700 Subject: [PATCH 2/3] point Usage: dotnet [options] Usage: dotnet [path-to-application] Options: -h|--help Display help. --info Display .NET information. --list-sdks Display the installed SDKs. --list-runtimes Display the installed runtimes. path-to-application: The path to an application .dll file to execute. add the sln file --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 217f7cb..4d020b5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -23,6 +23,6 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build --no-restore + run: dotnet build src/AdventOfCode.sln --no-restore - name: Test - run: dotnet test --no-build --verbosity normal + run: dotnet test src/AdventOfcode.sln --no-build --verbosity normal From 71275f7549bf3829c4950fed34d4769457cd8517 Mon Sep 17 00:00:00 2001 From: dninemfive <11084010+dninemfive@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:09:04 -0700 Subject: [PATCH 3/3] point `dotnet restore` at the sln as well --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4d020b5..0562ac6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -21,7 +21,7 @@ jobs: with: dotnet-version: 8.0.x - name: Restore dependencies - run: dotnet restore + run: dotnet restore src/AdventOfCode.sln - name: Build run: dotnet build src/AdventOfCode.sln --no-restore - name: Test