diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 10570e0..d261b69 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -6,25 +6,23 @@ on: pull_request: branches: [ "main" ] +# Set global defaults, including the working directory +defaults: + run: + working-directory: ./src # Default working directory for all jobs and steps + jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - name: Set up .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: | - 3.1.x - 6.0.x - 7.0.x - 8.0.x - dotnet-quality: 'preview' + dotnet-version: ${{ vars.DOTNET_VERSION }} # Using repository-level environment variable - name: Restore dependencies - run: dotnet restore src/Nino.sln + run: dotnet restore - name: Build - run: dotnet build src/Nino.sln --no-restore + run: dotnet build --no-restore - name: Test - run: dotnet test src/Nino.sln --no-build --verbosity normal + run: dotnet test --no-build --verbosity normal