Last active
October 25, 2024 18:32
-
-
Save guibranco/bb7952adc79b2a37ad4db489e394a2d0 to your computer and use it in GitHub Desktop.
Sample build & test GitHub Action file for .NET 8
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: Build | |
on: | |
push: | |
branches: | |
- '*' | |
- '*/*' | |
- '**' | |
- '!main' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Build solution | |
run: dotnet build -c Debug | |
- name: Run tests | |
run: dotnet test -c Debug --no-build --no-restore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment