fix: update pipeline golang version #9
Workflow file for this run
This file contains 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] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
redis-version: [6] | |
go: ["1.22"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Sets up a Memcached server | |
uses: niden/actions-memcached@v7 | |
- name: Start Redis | |
uses: supercharge/[email protected] | |
with: | |
redis-version: ${{ matrix.redis-version }} | |
- uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: install deps | |
run: go mod tidy | |
- name: run test | |
run: go test -v -coverprofile=profile.cov ./... | |
- name: Send coverage to coverall.io | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: profile.cov | |
flag-name: Go-${{ matrix.go }} | |
parallel: true | |
# notifies that all test jobs are finished. | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: shogo82148/actions-goveralls@v1 | |
with: | |
parallel-finished: true | |
release-on-push: | |
runs-on: ubuntu-latest | |
needs: | |
- test | |
- finish | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: rymndhng/release-on-push-action@master | |
id: release_package | |
with: | |
bump_version_scheme: patch | |
- name: update go.pkg.dev with new version | |
env: | |
VERSION: ${{steps.release_package.outputs.version}} | |
run: curl https://sum.golang.org/lookup/github.com/${GITHUB_REPOSITORY}@${VERSION} | |