Try an authentication matrix

This commit is contained in:
Eddy Filip
2023-04-10 16:37:39 +02:00
parent 0b706bbe43
commit 2e386ac304

View File

@@ -2,20 +2,28 @@ on: push
name: Run acceptance tests name: Run acceptance tests
jobs: jobs:
use-connect-without-export-env: test-with-output-secrets:
strategy: strategy:
matrix: matrix:
os: [ ubuntu-latest, macos-latest ] os: [ ubuntu-latest, macos-latest ]
auth: [ connnect, service-account ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Launch 1Password Connect instance - name: Launch 1Password Connect instance
if: ${{ matrix.auth == 'connect' }}
env: env:
OP_CONNECT_CREDENTIALS: ${{ secrets.OP_CONNECT_CREDENTIALS }} OP_CONNECT_CREDENTIALS: ${{ secrets.OP_CONNECT_CREDENTIALS }}
run: | run: |
echo "$OP_CONNECT_CREDENTIALS" > 1password-credentials.json echo "$OP_CONNECT_CREDENTIALS" > 1password-credentials.json
docker-compose -f tests/fixtures/docker-compose.yml up -d && sleep 10 docker-compose -f tests/fixtures/docker-compose.yml up -d && sleep 10
- name: Configure Service account
if: ${{ matrix.auth == 'service-account' }}
uses: ./configure
with:
service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- name: Configure 1Password Connect - name: Configure 1Password Connect
if: ${{ matrix.auth == 'connect' }}
uses: ./configure # 1password/load-secrets-action/configure@<version> uses: ./configure # 1password/load-secrets-action/configure@<version>
with: with:
connect-host: localhost:8080 connect-host: localhost:8080