Skip to content

chore: update vitest deps together #697

chore: update vitest deps together

chore: update vitest deps together #697

Workflow file for this run

name: Build & Test
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
DOTNET_VERSION: 9.0.x
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_INSTALL_DIR: "./.dotnet"
permissions:
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Generate tag and labels for the docker image
id: meta
uses: docker/metadata-action@v5
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build & Test
run: |
dotnet restore
dotnet build --no-restore
dotnet test --collect:"XPlat Code Coverage"
- name: SonarScanner for .NET 9 with pull request decoration support
uses: highbyte/[email protected]
with:
sonarProjectKey: callmytrade-api
sonarProjectName: callmytrade-api
sonarOrganization: khavishbhundoo
dotnetTestArguments: --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx"
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image locally
uses: docker/build-push-action@v6
with:
context: .
file: './src/CallMyTrade.Api/Dockerfile'
platforms: 'linux/amd64'
load: true
tags: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
- name: Scan for vulnerabilities
id: scan
uses: crazy-max/ghaction-container-scan@v3
with:
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
dockerfile: './src/CallMyTrade.Api/Dockerfile'