Skip to content

Update dotnet.yml

Update dotnet.yml #8

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET Core CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
# Install Homebrew
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)" # Load Homebrew into the path
# Install Docker using Homebrew
- name: Install Docker
run: |
brew install docker
brew install docker-machine
brew install docker-compose
- name: Start Docker
run: |
open -a Docker
- name: Verify Docker is running
run: docker --version
- name: Test
run: dotnet test --no-build --verbosity normal