Skip to content

Commit

Permalink
Updated workflow dependencies (#1243)
Browse files Browse the repository at this point in the history
- Bump dotnet-version to 8.x to match expected SDK
- Update JDK to Microsoft OpenJDK 21
  • Loading branch information
DrizzlyOwl authored Dec 10, 2024
1 parent d167d7d commit c3e97b7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull request checks
name: Pull request checks

on:
push:
Expand All @@ -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

- name: Setup .NET ${{ env.DOTNET_VERSION }}
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 }}
Expand Down
3 changes: 0 additions & 3 deletions Dfe.PrepareConversions/package-lock.json

This file was deleted.

6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

0 comments on commit c3e97b7

Please sign in to comment.