Skip to content

chore(deps): pin dependencies #7

chore(deps): pin dependencies

chore(deps): pin dependencies #7

Workflow file for this run

name: .NET CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Setup .NET
uses: actions/setup-dotnet@55ec9447dda3d1cf6bd587150f3262f30ee10815 # v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
# Cache the built artifacts for use in other workflows
- name: Cache build outputs
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3
with:
path: |
BCFileDecryptor/bin/Release
BCFileDecryptorTests/bin/Release
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
# Upload build artifacts for the test job
- name: Upload build artifacts
uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3
with:
name: build-artifacts
path: |
BCFileDecryptor/bin/Release
BCFileDecryptorTests/bin/Release
retention-days: 1
test:
name: Test
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Setup .NET
uses: actions/setup-dotnet@55ec9447dda3d1cf6bd587150f3262f30ee10815 # v3
with:
dotnet-version: 8.0.x
# Download build artifacts from the build job
- name: Download build artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3
with:
name: build-artifacts
path: ./
# Run tests using the built artifacts
- name: Run tests
run: dotnet test --no-build --verbosity normal --configuration Release