Skip to content

feat: update CI Go version #24

feat: update CI Go version

feat: update CI Go version #24

Workflow file for this run

name: Go
on: [push,pull_request]
jobs:
test:
strategy:
matrix:
go: ["1.19","1.20","1.21"]
runs-on: ubuntu-latest
services:
casbin:
image: quay.io/coreos/etcd
ports:
- 2379:2379
- 2380:2380
env:
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v2
- name: Run Unit tests
run: go test -v -coverprofile=profile.cov ./...
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=profile.cov -service=github
semantic-release:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run semantic-release
if: github.repository == 'casbin/etcd-watcher' && github.event_name == 'push'
run: |
npm install --save-dev semantic-release@17.2.4
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}