feat: fixed overflow issues #456
Workflow file for this run
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] | |
env: | |
DOTNET_MINIMUM_TEST_COVERAGE: 0 | |
jobs: | |
dotnet-tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: Server/ReasnAPI | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Install coverlet | |
run: dotnet tool install -g coverlet.console | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build solution | |
run: dotnet build --no-restore | |
- name: Test with dotnet | |
run: > | |
dotnet test | |
--no-build | |
--verbosity normal | |
--logger "trx;logfilename=${{ matrix.os }}-commit-${{ github.sha }}.trx" | |
--results-directory "TestResults-${{ matrix.os }}-commit-${{ github.sha }}" | |
- name: Run coverlet | |
run: > | |
coverlet . | |
--target "dotnet" | |
--targetargs "test --no-build" | |
--threshold ${{ env.DOTNET_MINIMUM_TEST_COVERAGE }} | |
- name: Upload dotnet test results | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: dotnet-results-${{ matrix.os }}-commit-${{ github.sha }} | |
path: Server/ReasnAPI/TestResults-${{ matrix.os }}-commit-${{ github.sha }} | |
retention-days: 14 | |
client-tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: Client/reasn-client | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21.7.x' | |
- name: Set yarn version | |
run: yarn set version 4.1 | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Test with jest | |
run: yarn test --coverage --ci |