Skip to content

Update dependabot.yml #143

Update dependabot.yml

Update dependabot.yml #143

Workflow file for this run

name: Test
on:
push:
branches: [main]
paths-ignore: ['**/*.md', '**/*.png', '**/*.txt']
pull_request:
branches: [main, preview]
types: [opened, reopened, synchronize, ready_for_review]
paths-ignore: ['**/*.md', '**/*.png', '**/*.txt']
env:
CONFIGURATION: 'Release'
permissions:
contents: read
pull-requests: read
jobs:
checks_tests_need:
runs-on: ubuntu-latest
outputs:
abstractions_changed: ${{ steps.filter.outputs.abstractions }}
cosmosdb_changed: ${{ steps.filter.outputs.cosmosdb }}
dapper_changed: ${{ steps.filter.outputs.dapper }}
efcore_changed: ${{ steps.filter.outputs.efcore }}
mongodb_changed: ${{ steps.filter.outputs.mongodb }}
nhibernate_changed: ${{ steps.filter.outputs.nhibernate }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Filter paths to trigger tests
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
abstractions:
- '**/.github/workflows/test.yml'
- '**/FeatureManagement.Database.Abstractions/**'
- '**/FeatureManagement.Database.Tests/**'
cosmosdb:
- '**/.github/workflows/test.yml'
- '**/FeatureManagement.Database.Abstractions/**'
- '**/FeatureManagement.Database.CosmosDB/**'
- '**/FeatureManagement.Database.CosmosDB.Tests/**'
dapper:
- '**/.github/workflows/test.yml'
- '**/FeatureManagement.Database.Abstractions/**'
- '**/FeatureManagement.Database.Dapper/**'
- '**/FeatureManagement.Database.Dapper.Tests/**'
efcore:
- '**/.github/workflows/test.yml'
- '**/FeatureManagement.Database.Abstractions/**'
- '**/FeatureManagement.Database.EntityFrameworkCore*/**'
- '**/FeatureManagement.Database.EntityFrameworkCore*.Tests/**'
mongodb:
- '**/.github/workflows/test.yml'
- '**/FeatureManagement.Database.Abstractions/**'
- '**/FeatureManagement.Database.MongoDB/**'
- '**/FeatureManagement.Database.MongoDB.Tests/**'
nhibernate:
- '**/.github/workflows/test.yml'
- '**/FeatureManagement.Database.Abstractions/**'
- '**/FeatureManagement.Database.NHibernate/**'
- '**/FeatureManagement.Database.NHibernate.Tests/**'
run_tests:
needs: checks_tests_need
runs-on: ubuntu-latest
strategy:
matrix:
test_type: [
{ name: "Abstractions", condition: "abstractions_changed" },
{ name: "CosmosDB", condition: "cosmosdb_changed" },
{ name: "Dapper", condition: "dapper_changed" },
{ name: "EntityFrameworkCore", condition: "efcore_changed" },
{ name: "MongoDB", condition: "mongodb_changed" },
{ name: "NHibernate", condition: "nhibernate_changed" },
]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Start CosmosDB Emulator
if: matrix.test_type.name == 'CosmosDB' && needs.checks_tests_need.outputs.cosmosdb_changed == 'true'
uses: ./.github/actions/cosmosdb-setup
- name: Run ${{ matrix.test_type.name }} tests
if: needs.checks_tests_need.outputs[matrix.test_type.condition] == 'true'
shell: pwsh
run: ./test.ps1 -Configuration ${{ env.CONFIGURATION }} -TestType ${{ matrix.test_type.name }}