diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05c9a49..3a7547f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,15 +12,19 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 + - run: git fetch --force --tags + - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 + cache: true + check-latest: true - name: Run GoReleaser diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48b670f..842c1bc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,45 +13,37 @@ jobs: strategy: matrix: - os: [ubuntu-latest,macos-latest,windows-latest] - go-version: [1.14.x, 1.15.x, 1.17.x, 1.18.x] - # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-new-combinations - exclude: + os: [ubuntu-latest] + go-version: [1.18.x, 1.19.x] + # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-expanding-configurations + include: - os: windows-latest - go-version: 1.14.x + go-version: 1.19.x - os: macos-latest - go-version: 1.14.x + go-version: 1.19.x steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - # See https://github.com/actions/cache/blob/master/examples.md#go---modules - - name: Cache Go Modules - uses: actions/cache@v2 + - name: Install Go + uses: actions/setup-go@v3 with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version: ${{ matrix.go-version }} + cache: true - name: Go install moq - run: go install -mod=readonly + run: go install - name: Run vet if: matrix.os == 'ubuntu-latest' - run: go vet -mod=readonly ./... + run: go vet ./... - name: Lint if: matrix.os == 'ubuntu-latest' run: | - GO111MODULE=off go get -u golang.org/x/lint/golint + go install golang.org/x/lint/golint@latest golint ./... - name: Test - run: go test -mod=readonly ./... + run: go test ./...