using enviroment for windows build #35
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Examples-Test: | |
env: | |
BUILD_CONFIG: 'Release' | |
SOLUTION: 'Solution/UnitTest.sln' | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
contents: write | |
actions: write | |
checks: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.x | |
- name: Setup Chrome-Browser | |
uses: browser-actions/setup-chrome@v1 | |
with: | |
# Optional: do not specify to match Chrome's version | |
chrome-version: '125' | |
- name: Setup Chrome-driver | |
uses: nanasess/setup-chromedriver@v2 | |
with: | |
# Optional: do not specify to match Chrome's version | |
chromedriver-version: '125.0.6422.14100' | |
- name: Restore dependencies | |
run: dotnet restore $SOLUTION | |
- name: Run Test | |
run: dotnet test $SOLUTION --configuration $BUILD_CONFIG --logger "trx;LogFileName=test-results.trx" || true | |
- name: Examples Report | |
uses: dorny/test-reporter@v1 | |
if: always() | |
with: | |
name: Test Report | |
path: "**/test-results.trx" | |
reporter: dotnet-trx | |
only-summary: 'false' | |
fail-on-error: true | |
Release-Build: | |
env: | |
BUILD_CONFIG: 'Release' | |
SOLUTION: 'Solution/UnitTest.sln' | |
runs-on: windows-latest | |
permissions: | |
issues: write | |
contents: write | |
actions: write | |
checks: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.x | |
- name: Build Project | |
run: dotnet build %SOLUTION% --configuration %BUILD_CONFIG% |