From 305c01b93af8984604ce531b2a633af91b0c3ca9 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Thu, 16 May 2024 12:38:42 +0100 Subject: [PATCH] Add workflow job for checking library versions are compatible --- .github/workflows/ci.yml | 30 +++++++++++++++++++++++++++++- s2/Program.cs | 2 ++ s2/s2.csproj | 10 ++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 s2/Program.cs create mode 100644 s2/s2.csproj diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d248228..3bf35e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ on: jobs: build: - name: "Build & package" runs-on: ubuntu-latest @@ -56,3 +55,32 @@ jobs: src/Dfe.Analytics.AspNetCore/bin/Release/*.nupkg src/Dfe.Analytics.AspNetCore/bin/Release/*.snupkg if-no-files-found: error + + check_versions: + name: "Check library version compatibility" + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/checkout@v2 + + - run: | + mkdir app && cd app + mkdir lib + + - name: Download Dfe.Analytics.Common.nupkg artifact + uses: actions/download-artifact@v2 + with: + name: Dfe.Analytics.Common.nupkg + path: app/lib + + - name: Download Dfe.Analytics.AspNetCore.nupkg artifact + uses: actions/download-artifact@v2 + with: + name: Dfe.Analytics.AspNetCore.nupkg + path: app/lib + + - run : | + cd app + dotnet new console + dotnet add package Dfe.Analytics.AspNetCore --source lib --prerelease diff --git a/s2/Program.cs b/s2/Program.cs new file mode 100644 index 0000000..3751555 --- /dev/null +++ b/s2/Program.cs @@ -0,0 +1,2 @@ +// See https://aka.ms/new-console-template for more information +Console.WriteLine("Hello, World!"); diff --git a/s2/s2.csproj b/s2/s2.csproj new file mode 100644 index 0000000..2150e37 --- /dev/null +++ b/s2/s2.csproj @@ -0,0 +1,10 @@ + + + + Exe + net8.0 + enable + enable + + +