From 352d270e62188e78ba04cceb056423b0282d6760 Mon Sep 17 00:00:00 2001 From: Ash Davies <3853061+DrizzlyOwl@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:04:30 +0000 Subject: [PATCH] Updated workflow dependencies - Bump dotnet-version to 8.x to match expected SDK - Update JDK to Microsoft OpenJDK 21 --- .github/workflows/build.yml | 24 ++++++++++++++++++------ Dfe.PrepareConversions/package-lock.json | 3 --- package-lock.json | 6 ------ 3 files changed, 18 insertions(+), 15 deletions(-) delete mode 100644 Dfe.PrepareConversions/package-lock.json delete mode 100644 package-lock.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dcb9dacb..9a70bf77f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Pull request checks +name: Pull request checks on: push: @@ -14,50 +14,62 @@ on: - '!Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests/**' env: - JAVA_VERSION: '17' + JAVA_VERSION: '21' + DOTNET_VERSION: '8.0.x' jobs: lint: + name: Lint Cypress runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones disabled for a better relevancy of SC analysis - - name: lint cypress tests + + - name: lint cypress tests run: | cd Dfe.PrepareConversions/Dfe.PrepareConversions.CypressTests npm ci npm run lint build: + name: Build .NET, Test and Analyse runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones disabled for a better relevancy of SC analysis + - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.403 - - name: Set up JDK 11 + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Set up JDK ${{ env.JAVA_VERSION }} uses: actions/setup-java@v4 with: java-version: ${{ env.JAVA_VERSION }} distribution: 'microsoft' + - name: Cache SonarCloud packages uses: actions/cache@v4 with: path: ~\sonar\cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar + - name: Install SonarCloud scanners run: dotnet tool install --global dotnet-sonarscanner + - name: Install dotnet reportgenerator run: dotnet tool install --global dotnet-reportgenerator-globaltool + - name: Add nuget package source run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/DFE-Digital/index.json" + - name: Restore dependencies run: dotnet restore Dfe.PrepareConversions/Dfe.PrepareConversions.sln + - name: Build, Test and Analyze env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dfe.PrepareConversions/package-lock.json b/Dfe.PrepareConversions/package-lock.json deleted file mode 100644 index 48e341a09..000000000 --- a/Dfe.PrepareConversions/package-lock.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "lockfileVersion": 1 -} diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 60b2164d5..000000000 --- a/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "prepare-academy-conversions", - "lockfileVersion": 3, - "requires": true, - "packages": {} -}