Skip to content
Merged
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
34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Unit tests

# Manually triggered only - so tests can be run once PR comments are resolved,
# instead of on every push.
#
# Two ways to trigger:
# 1. Add the "run-tests" label to a pull request (re-add it to re-run).
# 2. Actions -> "Unit tests" -> "Run workflow" and pick a branch.
on:
pull_request:
types: [labeled]
workflow_dispatch:

jobs:
test:
# For the label trigger, only react to the "run-tests" label.
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'run-tests'
runs-on: ubuntu-latest
timeout-minutes: 5

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

- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"

- name: Restore
run: dotnet restore Shoebox.slnx

- name: Test
run: dotnet test Shoebox.slnx --configuration Release --no-restore
Loading