verify working directory continuous.yml #99
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: .NET 9 CI | |
on: [ workflow_dispatch, push, pull_request ] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: "Verify working directory" | |
run: ls -R | |
- name: Set up .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Install linting tools | |
run: | | |
dotnet tool restore | |
- name: Validate code linter with Csharpier | |
run: | | |
dotnet dotnet-csharpier --check . | |
build: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Publish build artefact | |
run: dotnet publish --configuration Release --output ./output | |
- name: Upload artefact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-build | |
path: ./output | |
unit_tests: | |
runs-on: ubuntu-latest | |
needs: [lint, build ] | |
steps: | |
- name: Download build artefact | |
uses: actions/download-artifact@v4 | |
with: | |
name: app-build | |
path: ./output | |
- name: Set up .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Run unit tests | |
run: dotnet test ./PlaceApi.sln --configuration Release --no-build --no-restore --filter "Category=Unit" | |
integration_tests: | |
runs-on: ubuntu-latest | |
needs: [lint, build ] | |
steps: | |
- name: Download build artefact | |
uses: actions/download-artifact@v4 | |
with: | |
name: app-build | |
path: ./output | |
- name: Set up .NET 9 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.0.x' | |
- name: Run integration tests | |
run: dotnet test ./PlaceApi.sln --configuration Release --no-build --no-restore --filter "Category=Integration" |