chore(pre-commit): dotnet-format and conventional-pre-commit #19
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: Run tests | |
on: | |
pull_request: | |
types: [opened, synchronize] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Check formatting | |
id: lint | |
continue-on-error: true | |
run: dotnet format --verify-no-changes | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Run tests | |
run: dotnet test | |
--no-build | |
--configuration Release | |
--verbosity normal | |
/p:CollectCoverage=true | |
/p:CoverletOutputFormat=lcov | |
/p:CoverletOutput=./TestResults/ | |
- name: Upload test results | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Fail if linting failed | |
if: steps.lint.outcome == 'failure' | |
run: | | |
echo "Linting failed. Failing the workflow." | |
exit 1 |