chore: remove untitles #650
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: Unit tests | |
on: [push] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dotnet-version: ['6.0.x' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Build docker database | |
run: docker build -t ottd_discord_test_database ./OpenttdDiscord.Database | |
- name: Test | |
run: dotnet test /p:NoTestParallel=true --no-restore --verbosity minimal --collect "XPlat Code Coverage" -c Release | |
env: | |
CI: true | |
- name: Test Report | |
uses: dorny/test-reporter@v1 | |
if: success() || failure() # run this step even if previous step failed | |
with: | |
name: XUnit Tests # Name of the check run which will be created | |
path: /home/runner/work/OpenttdDiscord/OpenttdDiscord/TestResults/**/*.trx # Path to test results | |
reporter: dotnet-trx # Format of test results | |
- name: Upload unit Test result | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
root_dir: /home/runner/work/OpenttdDiscord/OpenttdDiscord | |
flags: unittests | |
name: ${{ github.repository }} | |
fail_ci_if_error: true | |