From 0b706bbe431a4936d1326a808d6c1706692c881a Mon Sep 17 00:00:00 2001 From: Eddy Filip Date: Mon, 10 Apr 2023 16:12:29 +0200 Subject: [PATCH] Add os matrix for tests --- .github/workflows/test.yml | 50 ++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9306aed..be324c0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,10 @@ name: Run acceptance tests jobs: use-connect-without-export-env: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Launch 1Password Connect instance @@ -33,7 +36,10 @@ jobs: MULTILINE_SECRET: ${{ steps.load_secrets.outputs.MULTILINE_SECRET }} run: ./tests/assert-env-set.sh use-connect-with-export-env: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Launch 1Password Connect instance @@ -63,7 +69,10 @@ jobs: - name: Assert removed secrets run: ./tests/assert-env-unset.sh use-connect-with-references-with-id: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Launch 1Password Connect instance @@ -93,7 +102,10 @@ jobs: MULTILINE_SECRET: ${{ steps.load_secrets.outputs.MULTILINE_SECRET }} run: ./tests/assert-env-set.sh use-service-account-without-export-env: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Load secrets @@ -113,7 +125,10 @@ jobs: MULTILINE_SECRET: ${{ steps.load_secrets.outputs.MULTILINE_SECRET }} run: ./tests/assert-env-set.sh use-service-account-with-export-env: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Load secrets @@ -127,7 +142,10 @@ jobs: - name: Assert test secret values run: ./tests/assert-env-set.sh use-service-account-with-references-with-id: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Load secrets @@ -146,23 +164,3 @@ jobs: SECRET_IN_SECTION: ${{ steps.load_secrets.outputs.SECRET_IN_SECTION }} MULTILINE_SECRET: ${{ steps.load_secrets.outputs.MULTILINE_SECRET }} run: ./tests/assert-env-set.sh - run-on-macos-12: - runs-on: macos-12 - steps: - - uses: actions/checkout@v3 - - name: Load secrets - id: load_secrets - uses: ./ # 1password/load-secrets-action@ - with: - export-env: false - env: - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} - SECRET: op://acceptance-tests/test-secret/password - SECRET_IN_SECTION: op://acceptance-tests/test-secret/test-section/password - MULTILINE_SECRET: op://acceptance-tests/multiline-secret/notesPlain - - name: Assert test secret values - env: - SECRET: ${{ steps.load_secrets.outputs.SECRET }} - SECRET_IN_SECTION: ${{ steps.load_secrets.outputs.SECRET_IN_SECTION }} - MULTILINE_SECRET: ${{ steps.load_secrets.outputs.MULTILINE_SECRET }} - run: ./tests/assert-env-set.sh