on: push name: Run acceptance tests jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Launch 1Password Connect instance env: OP_CONNECT_CREDENTIALS: ${{ secrets.OP_CONNECT_CREDENTIALS }} run: | echo "$OP_CONNECT_CREDENTIALS" > 1password-credentials.json docker-compose -f tests/fixtures/docker-compose.yml up -d && sleep 10 - name: Configure 1Password Connect uses: ./configure with: connect-host: http://localhost:8080 connect-token: ${{ secrets.OP_CONNECT_TOKEN }} - name: Load secrets uses: ./ env: SECRET: op://v5pz6venw4roosmkzdq2nhpv6u/hrgkzhrlvscomepxlgafb2m3ca/password SECRET_IN_SECTION: op://v5pz6venw4roosmkzdq2nhpv6u/hrgkzhrlvscomepxlgafb2m3ca/test-section/password MULTILINE_SECRET: op://v5pz6venw4roosmkzdq2nhpv6u/ghtz3jvcc6dqmzc53d3r3eskge/notesPlain - name: Print environment variables with masked secrets run: printenv - name: Assert test secret values run: ./tests/assert-env-set.sh - name: Remove secrets uses: ./ with: unset-previous: true - name: Print environment variables with secrets removed run: printenv - name: Assert removed secrets run: ./tests/assert-env-unset.sh - name: Load secret again uses: ./ env: SECRET: op://v5pz6venw4roosmkzdq2nhpv6u/hrgkzhrlvscomepxlgafb2m3ca/password SECRET_IN_SECTION: op://v5pz6venw4roosmkzdq2nhpv6u/hrgkzhrlvscomepxlgafb2m3ca/test-section/password MULTILINE_SECRET: op://v5pz6venw4roosmkzdq2nhpv6u/ghtz3jvcc6dqmzc53d3r3eskge/notesPlain - name: Print environment variables with masked secrets run: printenv - name: Assert test secret values again run: ./tests/assert-env-set.sh