Update README.md #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: π¦ Setup Dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: π¦ Dotnet Restore | |
run: dotnet restore | |
- name: π¦ Dotnet Build | |
run: dotnet build --no-restore | |
- name: π§ Setup Cache Folder | |
run: mkdir -p ~/image-cache | |
- name: π§ Try Get Cache | |
id: image-cache | |
uses: actions/cache@v1 | |
with: | |
path: ~/image-cache | |
key: image-cache-${{ runner.os }} | |
- name: π§ If Cache miss | |
if: steps.image-cache.outputs.cache-hit != 'true' | |
run: | | |
docker pull mcr.microsoft.com/mssql/server:2019-CU18-ubuntu-20.04 | |
docker save -o ~/image-cache/mssql.tar alpine | |
- name: π§ If Cache hit | |
if: steps.image-cache.outputs.cache-hit == 'true' | |
run: docker load -i ~/image-cache/mssql.tar | |
- name: π€ Dotnet Test | |
run: dotnet test --no-build --verbosity normal |