feat: created posts #42
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
# Workflow responsible for validating the project's build, tests and code coverage when creating a pull request | |
name: "Checks" | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
cache-dependency-path: './Living.WebAPP/package-lock.json' | |
- name: Install dependencies | |
run: npm i | |
working-directory: Living.WebAPP | |
- name: Run Build | |
run: npm run build | |
working-directory: Living.WebAPP | |
- name: Run Lint | |
run: npm run lint | |
working-directory: Living.WebAPP | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Tests | |
run: dotnet test --configuration Release --logger GitHubActions --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=../coverage/ /p:ExcludeByFile="**/*Migrations/*.cs" /p:ExcludeByFile="**/*.g.cs" | |
- name: Tests Reporter | |
uses: bibipkins/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
comment-title: "Test Results" | |
results-path: ./**/TestResults/*.trx | |
coverage-path: ./coverage/coverage.cobertura.xml | |
coverage-type: cobertura | |
coverage-threshold: 0 |