Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Commit

Permalink
ci: drop go1.12 add go1.15
Browse files Browse the repository at this point in the history
Switch to code generation happening against 1.14.9

Update README to reflect new minimum version of Go 1.13

Change-Id: If8d790fe6500a708a2ba7fd8737ffd380048a1be
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7021
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
  • Loading branch information
myitcv committed Sep 10, 2020
1 parent 043c534 commit 6c27cef
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
fail-fast: false
matrix:
go-version:
- 1.12.x
- 1.13.x
- 1.14.3
- 1.14.9
- 1.15.x
os:
- ubuntu-latest
- macos-latest
Expand All @@ -38,15 +38,14 @@ jobs:
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum')
}}
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go-
- if: matrix.go-version == '1.14.3' && matrix.os != 'windows-latest'
- if: matrix.go-version == '1.14.9' && matrix.os != 'windows-latest'
name: Generate
run: go generate ./...
- name: Test
run: go test ./...
- name: Test with -race
run: go test -race ./...
- if: matrix.go-version == '1.14.3' || matrix.go-version == '1.13.x'
name: gorelease check
- name: gorelease check
run: go run golang.org/x/exp/cmd/gorelease
- name: Check that git is clean post generate and tests
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ jobs:
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum')
}}
restore-keys: ${{ runner.os }}-${{ matrix.go-version }}-go-
- if: matrix.go-version == '1.14.3' && matrix.os != 'windows-latest'
- if: matrix.go-version == '1.14.9' && matrix.os != 'windows-latest'
name: Generate
run: go generate ./...
- name: Test
run: go test ./...
- name: Test with -race
run: go test -race ./...
- if: matrix.go-version == '1.14.3' || matrix.go-version == '1.13.x'
name: gorelease check
- name: gorelease check
run: go run golang.org/x/exp/cmd/gorelease
- name: Check that git is clean post generate and tests
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
Expand All @@ -66,9 +65,9 @@ jobs:
fail-fast: false
matrix:
go-version:
- 1.12.x
- 1.13.x
- 1.14.3
- 1.14.9
- 1.15.x
os:
- ubuntu-latest
- macos-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[![Github](https://github.com/cuelang/cue/workflows/Test/badge.svg)](https://github.com/cuelang/cue/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/cuelang/cue)](https://goreportcard.com/report/github.com/cuelang/cue)
[![GolangCI](https://golangci.com/badges/github.com/cuelang/cue.svg)](https://golangci.com/r/github.com/cuelang/cue)
[![Go 1.12+](https://img.shields.io/badge/go-1.12-9cf.svg)](https://golang.org/dl/)
[![Go 1.13+](https://img.shields.io/badge/go-1.13-9cf.svg)](https://golang.org/dl/)
[![platforms](https://img.shields.io/badge/platforms-linux|windows|macos-inactive.svg)]()


Expand Down
12 changes: 5 additions & 7 deletions internal/ci/workflows.cue
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ workflows: [
#job: ((json.#Workflow & {}).jobs & {x: _}).x
#step: ((#job & {steps: _}).steps & [_])[0]

#latestGo: "1.14.3"
// We need at least go1.14 for code generation
#codeGenGo: "1.14.9"

#testStrategy: {
"fail-fast": false
matrix: {
// Use a stable version of 1.14.x for go generate
"go-version": ["1.12.x", "1.13.x", #latestGo]
"go-version": ["1.13.x", #codeGenGo, "1.15.x"]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
}
}
Expand Down Expand Up @@ -70,9 +71,9 @@ workflows: [
#goGenerate: #step & {
name: "Generate"
run: "go generate ./..."
// The Go version corresponds to the precise 1.14.x version specified in
// The Go version corresponds to the precise version specified in
// the matrix. Skip windows for now until we work out why re-gen is flaky
if: "matrix.go-version == '\(#latestGo)' && matrix.os != 'windows-latest'"
if: "matrix.go-version == '\(#codeGenGo)' && matrix.os != 'windows-latest'"
}

#goTest: #step & {
Expand All @@ -88,9 +89,6 @@ workflows: [
#goReleaseCheck: #step & {
name: "gorelease check"
run: "go run golang.org/x/exp/cmd/gorelease"
// Only run on 1.13.x and latest Go for now. Bug with Go 1.12.x means
// this check fails
if: "matrix.go-version == '\(#latestGo)' || matrix.go-version == '1.13.x'"
}

#checkGitClean: #step & {
Expand Down

0 comments on commit 6c27cef

Please sign in to comment.