chore: refactor interfaces for testability #20
Workflow file for this run
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: lint | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| GOPRIVATE: github.com/infracost/* | |
| jobs: | |
| golangci-lint: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| cache: false | |
| go-version-file: go.mod | |
| - uses: infracost/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.INFRACOST_CI_APP_ID }} | |
| private-key: ${{ secrets.INFRACOST_CI_APP_PRIVATE_KEY }} | |
| owner: infracost | |
| repositories: config | |
| - run: | | |
| git config --global url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/".insteadOf "https://github.com/" | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.10 | |
| mocks: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| cache: false | |
| go-version-file: go.mod | |
| - uses: infracost/create-github-app-token@v1 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.INFRACOST_CI_APP_ID }} | |
| private-key: ${{ secrets.INFRACOST_CI_APP_PRIVATE_KEY }} | |
| owner: infracost | |
| repositories: config | |
| - run: | | |
| git config --global url."https://x-access-token:${{ steps.app-token.outputs.token }}@github.com/".insteadOf "https://github.com/" | |
| - run: make mocks | |
| - name: Check for changes | |
| run: | | |
| if [ -n "$(git diff --name-only)" ]; then | |
| echo "Mock files are out of date. Please run 'make mock' and commit the changes." | |
| git diff --name-only | |
| exit 1 | |
| fi |