fix: add workspace to linter #37
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 Core CI with Docker | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
sql-server: | |
image: mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04 | |
ports: | |
- 1433:1433 | |
options: >- | |
--env ACCEPT_EULA=Y | |
--env SA_PASSWORD=YourStrong!Passw0rd | |
--health-cmd="/opt/mssql-tools/bin/sqlcmd -U sa -P YourStrong!Passw0rd -Q 'SELECT 1'" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=10 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
options: --health-cmd "redis-cli ping || exit 1" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Run linters | |
uses: wearerequired/lint-action@v2 | |
with: | |
dotnet_format: true | |
args: --workspace ./CacheManager.sln | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build the project | |
run: dotnet build --configuration Release | |
- name: Run tests | |
run: dotnet test --configuration Release --no-build |