Skip to content

Commit

Permalink
internal/ci: move workflow declarations to their own package
Browse files Browse the repository at this point in the history
In preparation for also specifying our GoReleaser configuration in CUE,
move the GitHub actions workflow declarations to their own package in
./internal/ci/github.

For now we continue to avoid placing this project-level configuration at
the root of the module for hygiene reasons (i.e. keeps the root of the
repository looking clean in GitHub and elsewhere, not littered with
files) but we might consider this if the pattern of having project level
configuration in a sub-directory becomes too strained.

Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I9816dac147e1826166eaac74b4e3c3d90f433e54
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/540683
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUEcueckoo <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
  • Loading branch information
myitcv committed Jul 6, 2022
1 parent f32ea8e commit 2795dcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion internal/ci/ci_tool.cue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"path"
"encoding/yaml"
"tool/file"

"cuelang.org/go/internal/ci/github"
)

// For the commands below, note we use simple yet hacky path resolution, rather
Expand All @@ -35,7 +37,7 @@ import (
command: genworkflows: {
_goos: string @tag(os,var=os)

for w in workflows {
for w in github.workflows {
"\(w.file)": file.Create & {
_dir: path.FromSlash("../../.github/workflows", path.Unix)
filename: path.Join([_dir, w.file], _goos)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package ci
package github

import (
"github.com/SchemaStore/schemastore/src/schemas/json"
Expand Down Expand Up @@ -420,7 +420,7 @@ _#goCheck: _#step & {
// dependencies that vary wildly between platforms.
// For now, to save CI resources, just run the checks on one matrix job.
// TODO: consider adding more checks as per https://github.com/golang/go/issues/42119.
if: "matrix.go-version == '\(_#latestStableGo)' && matrix.os == '\(_#linuxMachine)'"
if: "matrix.go-version == '\(_#latestStableGo)' && matrix.os == '\(_#linuxMachine)'"
name: "Check"
run: "go vet ./..."
}
Expand Down

0 comments on commit 2795dcc

Please sign in to comment.