mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-04-29 07:41:21 +00:00
feat: use matrix strategy for testing
This commit is contained in:
parent
3d9cb6ba30
commit
756cd7f0e5
1 changed files with 18 additions and 54 deletions
72
.github/workflows/tests.yml
vendored
72
.github/workflows/tests.yml
vendored
|
@ -73,67 +73,31 @@ jobs:
|
||||||
git tag -fa deployed -m "Deployed to Azure"
|
git tag -fa deployed -m "Deployed to Azure"
|
||||||
git push origin --tags --force
|
git push origin --tags --force
|
||||||
|
|
||||||
tests-no-access:
|
tests:
|
||||||
name: Tests with No Access
|
name: Run End-to-End Tests
|
||||||
needs: bicep
|
needs: bicep
|
||||||
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
|
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- filter: no_access
|
||||||
|
client-id-ref: AZURE_CLIENT_ID_NO_ACCESS
|
||||||
|
- filter: only_get
|
||||||
|
client-id-ref: AZURE_CLIENT_ID_GET
|
||||||
|
- filter: only_list
|
||||||
|
client-id-ref: AZURE_CLIENT_ID_LIST
|
||||||
|
- filter: get_and_list_access
|
||||||
|
client-id-ref: AZURE_CLIENT_ID_GET_LIST
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: test
|
environment: test
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: azure/login@v1
|
- name: Azure Login
|
||||||
|
uses: azure/login@v1
|
||||||
with:
|
with:
|
||||||
client-id: ${{ secrets.AZURE_CLIENT_ID_NO_ACCESS }}
|
client-id: ${{ secrets[matrix.client-id-ref] }}
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||||
- name: Run all tests
|
- name: Run ${{ matrix.filter }} tests
|
||||||
run: cargo test no_access
|
run: cargo test ${{ matrix.filter }}
|
||||||
tests-get:
|
|
||||||
name: Tests with Get
|
|
||||||
needs: bicep
|
|
||||||
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: test
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- uses: azure/login@v1
|
|
||||||
with:
|
|
||||||
client-id: ${{ secrets.AZURE_CLIENT_ID_GET }}
|
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
||||||
- name: Run all tests
|
|
||||||
run: cargo test only_get
|
|
||||||
tests-list:
|
|
||||||
name: Tests with List
|
|
||||||
needs: bicep
|
|
||||||
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: test
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- uses: azure/login@v1
|
|
||||||
with:
|
|
||||||
client-id: ${{ secrets.AZURE_CLIENT_ID_LIST }}
|
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
||||||
- name: Run all tests
|
|
||||||
run: cargo test only_list
|
|
||||||
tests-get-list:
|
|
||||||
name: Tests with Get and List
|
|
||||||
needs: bicep
|
|
||||||
if: always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: test
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- uses: azure/login@v1
|
|
||||||
with:
|
|
||||||
client-id: ${{ secrets.AZURE_CLIENT_ID_GET_LIST }}
|
|
||||||
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
|
|
||||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
|
||||||
- name: Run all tests
|
|
||||||
run: cargo test get_and_list_access
|
|
||||||
|
|
Loading…
Reference in a new issue