Skip to content

Commit

Permalink
Update test workflow (#43)
Browse files Browse the repository at this point in the history
Update test.yml

Fix condition
  • Loading branch information
teociaps committed Jul 20, 2024
1 parent 95eeb26 commit 83e70c6
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ jobs:
strategy:
matrix:
test_type: [
{ name: "Abstractions", env_condition: "abstractions_changed" },
{ name: "CosmosDB", env_condition: "cosmosdb_changed" },
{ name: "Dapper", env_condition: "dapper_changed" },
{ name: "EntityFrameworkCore", env_condition: "efcore_changed" },
{ name: "MongoDB", env_condition: "mongodb_changed" },
{ name: "NHibernate", env_condition: "nhibernate_changed" },
{ 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:
Expand All @@ -88,14 +88,11 @@ jobs:
6.0.x
8.0.x
- name: Set condition environment variable
run: echo "CONDITION=${{ needs.checks_tests_need.outputs[matrix.test_type.env_condition] }}" >> $GITHUB_ENV

- name: Start CosmosDB Emulator
if: matrix.test_type.name == 'CosmosDB'
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: ${{ env.CONDITION }} == true
if: needs.checks_tests_need.outputs[matrix.test_type.condition] == 'true'
shell: pwsh
run: ./test.ps1 -Configuration ${{ env.CONFIGURATION }} -TestType ${{ matrix.test_type.name }}
run: ./test.ps1 -Configuration ${{ env.CONFIGURATION }} -TestType ${{ matrix.test_type.name }}

0 comments on commit 83e70c6

Please sign in to comment.