Skip to content

Merge pull request #84 from milderhc/sk-java-hello-world #36

Merge pull request #84 from milderhc/sk-java-hello-world

Merge pull request #84 from milderhc/sk-java-hello-world #36

Workflow file for this run

#
# This workflow will build and run all unit tests.
#
name: dotnet-ci
on:
workflow_dispatch:
push:
branches: [ "main", "feature*" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
configuration: [Release, Debug]
runs-on: ${{ matrix.os }}
env:
NUGET_CERT_REVOCATION_MODE: offline
steps:
- uses: actions/checkout@v3
with:
clean: true
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Find solutions
shell: bash
run: echo "solutions=$(find . -type f -name "*.sln" | tr '\n' ' ')" >> $GITHUB_ENV
- name: Restore dependencies
shell: bash
run: |
for solution in ${{ env.solutions }}; do
dotnet restore $solution
done
- name: Build
shell: bash
run: |
for solution in ${{ env.solutions }}; do
dotnet build $solution --no-restore --configuration ${{ matrix.configuration }}
done
- name: Find unit test projects
shell: bash
run: echo "projects=$(find . -type f -name "*.UnitTests.csproj" | tr '\n' ' ')" >> $GITHUB_ENV