fix: authenticate GitHub API calls to avoid 60/hr unauthenticated rat… #1339
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: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.0' | |
| cache: true | |
| - name: install | |
| run: make install-tools | |
| - name: test | |
| run: make test | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage.* | |
| - name: Upload dist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3.1.0 | |
| with: | |
| file: ./coverage.out | |
| flags: ${{ runner.os }} | |
| - name: Report Status | |
| if: always() | |
| uses: ravsamhq/notify-slack-action@v1 | |
| with: | |
| status: ${{ job.status }} | |
| notify_when: "failure" | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }} |