Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

env:
SOLUTION_PATH: 'TournamentAPI.sln'

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
cache: true
cache-dependency-path: "**/packages.lock.json"

- name: Restore
run: dotnet restore ${{ env.SOLUTION_PATH }} --locked-mode

- name: Build
run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release --no-restore

- name: Test (Unit)
run: dotnet test TournamentAPI.UnitTests/TournamentAPI.UnitTests.csproj --configuration Release --no-restore --no-build

- name: Test (Integration)
env:
HealthCheck__ApiKey: ${{ secrets.HEALTHCHECK_API_KEY }}
run: dotnet test TournamentAPI.IntegrationTests/TournamentAPI.IntegrationTests.csproj --configuration Release --no-restore --no-build
5 changes: 5 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>
</Project>
Loading
Loading