improve workflows script #3
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: .NET UNIT TEST (run unit test) | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
test: | |
# config strategy | |
strategy: | |
max-parallel: 3 | |
matrix: | |
version: [ 8.0 ] | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
# config os | |
runs-on: ${{ matrix.os }} | |
# config steps | |
steps: | |
# config environment | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
# config dotnet version | |
with: | |
dotnet-version: ${{ matrix.version }} | |
# restore dependencies | |
- name: Restore Test Project | |
run: dotnet restore ./test/NetlyTest.csproj | |
# run netly test | |
- name: Test Netly Library | |
run: dotnet test ./test/NetlyTest.csproj --no-restore |