diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 82db391..f066aff 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -73,67 +73,31 @@ jobs: git tag -fa deployed -m "Deployed to Azure" git push origin --tags --force - tests-no-access: - name: Tests with No Access + tests: + name: Run End-to-End Tests needs: bicep 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 environment: test steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - - uses: azure/login@v1 + - name: Azure Login + uses: azure/login@v1 with: - client-id: ${{ secrets.AZURE_CLIENT_ID_NO_ACCESS }} + client-id: ${{ secrets[matrix.client-id-ref] }} tenant-id: ${{ secrets.AZURE_TENANT_ID }} subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} - - name: Run all tests - run: cargo test no_access - 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 + - name: Run ${{ matrix.filter }} tests + run: cargo test ${{ matrix.filter }} diff --git a/Cargo.lock b/Cargo.lock index 7b03eef..e80aa8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1169,9 +1169,9 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -1210,9 +1210,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" dependencies = [ "cc", "libc",