Test #1335
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| inputs: | |
| debug_enabled: | |
| type: boolean | |
| description: Debug with tmate | |
| required: false | |
| default: false | |
| permissions: | |
| actions: write | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| APPLE_ID: "${{ vars.APPLE_ID }}" | |
| jobs: | |
| test: | |
| defaults: | |
| run: | |
| shell: bash | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Homebrew | |
| id: set-up-homebrew | |
| uses: Homebrew/actions/setup-homebrew@main | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '^1.20' | |
| - name: Load 1Password secrets for signing tools | |
| uses: 1password/load-secrets-action@v2 | |
| with: | |
| export-env: true | |
| env: | |
| OP_SERVICE_ACCOUNT_TOKEN: "${{ secrets.TESTS_SERVICE_ACCOUNT_TOKEN }}" | |
| APP_SPECIFIC_PASSWORD: "op://test-secrets/SIGNING_TOOLS_APP_SPECIFIC_PASSWORD/credential" | |
| SIGNING_TOOLS_SIGNING_PASSWORD: "op://test-secrets/SIGNING_TOOLS_SIGNING_PASSWORD/credential" | |
| - name: Debug environment variables | |
| run: | | |
| echo "APPLE_ID: ${APPLE_ID}" | |
| echo "APP_SPECIFIC_PASSWORD set: $([ -n "${APP_SPECIFIC_PASSWORD}" ] && echo "yes" || echo "no")" | |
| echo "SIGNING_TOOLS_SIGNING_PASSWORD set: $([ -n "${SIGNING_TOOLS_SIGNING_PASSWORD}" ] && echo "yes" || echo "no")" | |
| - run: | | |
| brew tap bats-core/bats-core | |
| brew install bats-core gnu-getopt jq xq yq | |
| - name: Setup tmate session | |
| uses: mxschmitt/action-tmate@v3 | |
| with: | |
| limit-access-to-actor: true | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
| - name: Test signing/notarizing | |
| run: | | |
| for item in tests/*.bats; do | |
| echo "Running ${item}" | |
| bats "${item}" | |
| done | |
| # - uses: gautamkrishnar/keepalive-workflow@v2 |