Skip to content

Remove Jenkinsfile and add Docker support for CI/CD #4

Remove Jenkinsfile and add Docker support for CI/CD

Remove Jenkinsfile and add Docker support for CI/CD #4

Workflow file for this run

name: .NET CI
permissions:
contents: read
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore
run: dotnet restore MyNumberNET.sln
- name: Build
run: dotnet build MyNumberNET.sln --configuration Release --no-restore
- name: Test
run: dotnet test MyNumberNET.sln --configuration Release --no-build --verbosity normal