Test Credentials #9
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 Credentials | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: test-credentials-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-gcp-credentials: | |
| name: Test GCP credentials | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: google-github-actions/auth@v3 | |
| with: | |
| credentials_json: ${{ secrets.TEST_GCP_CREDENTIALS }} | |
| - uses: google-github-actions/setup-gcloud@v3 | |
| - run: gcloud config get-value project > /dev/null && echo "GCP credentials test succeeded" | |
| test-gh-bot-token: | |
| name: Test GitHub bot token | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - run: gh api user --jq '.login' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.TEST_GH_BOT_TOKEN }} | |
| test-zenhub-gql-api-token: | |
| name: Test Zenhub GraphQL API token | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - run: | | |
| curl -X POST https://api.zenhub.com/public/graphql \ | |
| -H "Authorization: Bearer $ZENHUB_GQL_API_TOKEN" \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"query": "{ viewer { githubUser { login } } }"}' \ | |
| --fail --silent --show-error | |
| env: | |
| ZENHUB_GQL_API_TOKEN: ${{ secrets.TEST_ZENHUB_GQL_API_TOKEN }} | |