release v1.1.0 (#248) #364
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: Pull Request Check | |
| on: | |
| pull_request: | |
| push: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pull-requests: read # Use with `only-new-issues` option. | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.19 | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -v -coverprofile=coverage.out ./... | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: coverage.out | |
| flags: unittests | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| golangci: | |
| name: lint | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-go@v4 | |
| with: | |
| go-version: 1.19 | |
| - uses: actions/checkout@v3 | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v3 | |
| with: | |
| version: latest | |
| only-new-issues: true | |
| skip-cache: true # To prevent occasional failure of this action. | |
| typos: | |
| name: typos | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: typos | |
| uses: crate-ci/typos@master | |
| go-apidiff: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: 'stable' | |
| # Use merge-base to only detect breaking changes introduced by this PR, | |
| # not changes from main that were merged after the PR branch was created. | |
| - name: Get merge base | |
| id: merge-base | |
| run: | | |
| MERGE_BASE=$(git merge-base HEAD origin/${{ github.base_ref }}) | |
| echo "sha=$MERGE_BASE" >> "$GITHUB_OUTPUT" | |
| - uses: joelanford/go-apidiff@main | |
| with: | |
| base-ref: ${{ steps.merge-base.outputs.sha }} |