re-use binary of build stage in docker image #117
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
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| name: run tests | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run linters | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: v1.64.7 | |
| args: --out-format=github-actions | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Verify go version | |
| run: | | |
| echo "GOVERSION=$(go version)" >> $GITHUB_ENV | |
| go version | |
| - name: Run tests | |
| run: go test -v -covermode=count -coverprofile=coverage.out | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8 #2.3.4 | |
| with: | |
| github-token: ${{ secrets.github_token }} | |
| file: coverage.out | |
| format: golang |