diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 8c230679..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - -version: 2 -updates: - - package-ecosystem: "nuget" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" diff --git a/.github/workflows/dotnet-fmk.yml b/.github/workflows/dotnet-fmk.yml deleted file mode 100644 index 2cefa760..00000000 --- a/.github/workflows/dotnet-fmk.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: .NET 4.7.2 - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: windows-2019 - - steps: - - uses: actions/checkout@v3 - - name: Setup .NET Core SDK .NET 6 - uses: actions/setup-dotnet@v2 - with: - dotnet-version: '6.0.x' - - name: Install dependencies - run: dotnet restore "src" - - name: Build - run: dotnet build "src" --configuration Release --no-restore -f net472 - - test: - runs-on: windows-2019 - - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - name: Setup .NET Core SDK '6.0.x' - uses: actions/setup-dotnet@v2 - with: - dotnet-version: '6.0.x' - - name: Install dependencies - run: dotnet restore - - name: Test - run: dotnet test "tests\Mindee.UnitTests" -f net472 --no-restore --verbosity normal diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6c7a2942..038ae7fa 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,37 +1,80 @@ -name: .NET 6 +# +# Run unit tests. +# +name: Test on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + - push jobs: - build: - runs-on: ubuntu-latest - + test-nix: + name: Run Tests on *nix + timeout-minutes: 30 + strategy: + matrix: + os: + - "ubuntu-latest" + - "macos-latest" + dotnet-version: + - "net6.0" + #- "net7.0" + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Setup .NET Core SDK .NET 6 - uses: actions/setup-dotnet@v2 with: - dotnet-version: '6.0.x' + submodules: recursive + + - name: Set up .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: "7.0.x" + + - uses: actions/cache@v3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Install dependencies - run: dotnet restore "src" - - name: Build - run: dotnet build "src" --configuration Release --no-restore - - test: - runs-on: ubuntu-latest + run: | + dotnet restore + + - name: Build and test + run: | + dotnet test -f ${{ matrix.dotnet-version }} --no-restore --verbosity normal "tests\Mindee.UnitTests" + + test-windows: + name: Run Tests on Windows + timeout-minutes: 30 + strategy: + matrix: + dotnet-version: + - "net472" + - "net6.0" + #- "net7.0" + runs-on: "windows-latest" steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v2 + + - name: Set up .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: "7.0.x" + + - uses: actions/cache@v3 with: - dotnet-version: '6.0.x' + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Install dependencies - run: dotnet restore - - name: Test - run: dotnet test "tests\Mindee.UnitTests" -f net6.0 --no-restore --verbosity normal + run: | + dotnet restore + + - name: Build and test + run: | + dotnet test -f ${{ matrix.dotnet-version }} --no-restore --verbosity normal "tests\Mindee.UnitTests"