From 7c3deef5f9687b7f331be5ede461f25f950ea40f Mon Sep 17 00:00:00 2001 From: Volodymyr Zotov Date: Mon, 8 Sep 2025 16:25:11 -0500 Subject: [PATCH 1/4] Fix acceptance-test workflow --- .github/workflows/acceptance-test.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/acceptance-test.yml b/.github/workflows/acceptance-test.yml index f13bac6..aaa4924 100644 --- a/.github/workflows/acceptance-test.yml +++ b/.github/workflows/acceptance-test.yml @@ -42,6 +42,7 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository ) ) + - name: Fork based /ok-to-test checkout uses: actions/checkout@v4 with: @@ -53,6 +54,7 @@ jobs: github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.args.named.sha ) + - name: Launch 1Password Connect instance if: ${{ inputs.auth == 'connect' }} env: @@ -60,11 +62,13 @@ jobs: run: | echo "$OP_CONNECT_CREDENTIALS" > 1password-credentials.json docker compose -f tests/fixtures/docker-compose.yml up -d && sleep 10 + - name: Configure Service account if: ${{ inputs.auth == 'service-account' }} uses: ./configure with: service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} + - name: Verify Service Account env var is set if: ${{ inputs.auth == 'service-account' }} shell: bash @@ -73,12 +77,14 @@ jobs: echo "OP_SERVICE_ACCOUNT_TOKEN environment variable is not set" >&2 exit 1 fi + - name: Configure 1Password Connect if: ${{ inputs.auth == 'connect' }} uses: ./configure # 1password/load-secrets-action/configure@ with: connect-host: http://localhost:8080 connect-token: ${{ secrets.OP_CONNECT_TOKEN }} + - name: Verify Connect env vars are set if: ${{ inputs.auth == 'connect' }} run: | @@ -86,6 +92,7 @@ jobs: echo "OP_CONNECT_HOST or OP_CONNECT_TOKEN environment variables are not set" >&2 exit 1 fi + - name: Load secrets id: load_secrets uses: ./ # 1password/load-secrets-action@ @@ -97,22 +104,28 @@ jobs: SECRET_IN_SECTION: ${{ inputs.secret-in-section }} MULTILINE_SECRET: ${{ inputs.multiline-secret }} OP_ENV_FILE: ./tests/.env.tpl + - name: Assert test secret values [step output] if: ${{ !inputs.export-env }} 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 }} - OP_ENV_FILE: ./tests/.env.tpl + FILE_SECRET: ${{ steps.load_secrets.outputs.FILE_SECRET }} + FILE_SECRET_IN_SECTION: ${{ steps.load_secrets.outputs.FILE_SECRET_IN_SECTION }} + FILE_MULTILINE_SECRET: ${{ steps.load_secrets.outputs.FILE_MULTILINE_SECRET }} run: ./tests/assert-env-set.sh + - name: Assert test secret values [exported env] if: ${{ inputs.export-env }} run: ./tests/assert-env-set.sh + - name: Remove secrets [exported env] if: ${{ inputs.export-env }} uses: ./ # 1password/load-secrets-action@ with: unset-previous: true + - name: Assert removed secrets [exported env] if: ${{ inputs.export-env }} run: ./tests/assert-env-unset.sh From bdf1f8ceff5adf6159261a66221dff6fcf7d3c2c Mon Sep 17 00:00:00 2001 From: Volodymyr Zotov Date: Mon, 8 Sep 2025 16:29:18 -0500 Subject: [PATCH 2/4] Run acceptance tests only when PR is opened, synchronize(changes pushed) or reopened --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6925d4e..331f101 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,8 @@ on: push: branches: [main] pull_request: + types: [ opened, synchronize, reopened ] + branches: [ '**' ] # run for PRs targeting any branch (main and others) name: Run acceptance tests jobs: From 9fb38d43e1feeda2496daafbab136a07282d77b5 Mon Sep 17 00:00:00 2001 From: Volodymyr Zotov Date: Thu, 11 Dec 2025 15:00:10 -0600 Subject: [PATCH 3/4] Ignore .idea folder --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b509c88..f538381 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ coverage/ node_modules/ +.idea/ \ No newline at end of file From 7ee331322fe1485c6ca972716d2d52cda700af1e Mon Sep 17 00:00:00 2001 From: Volodymyr Zotov Date: Thu, 11 Dec 2025 15:03:59 -0600 Subject: [PATCH 4/4] Fix lint error --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 331f101..772ac00 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,8 +2,8 @@ on: push: branches: [main] pull_request: - types: [ opened, synchronize, reopened ] - branches: [ '**' ] # run for PRs targeting any branch (main and others) + types: [opened, synchronize, reopened] + branches: ["**"] # run for PRs targeting any branch (main and others) name: Run acceptance tests jobs: