From 28bbd67ad47b9fbbdbb5a08a563d6794030b1934 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Mon, 6 May 2024 14:30:25 -0700 Subject: [PATCH] ci: verify that generated project can build and test --- .github/workflows/ci.yaml | 31 +++++++++++++++++++++++++++++++ scaffold.yaml | 7 ++++--- 2 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..073112e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,31 @@ +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '>=1.22' + - uses: bazel-contrib/setup-bazel@0.8.2 + with: + bazelisk-cache: true + repository-cache: true + - run: go install github.com/hay-kot/scaffold@710f210eeacdd6b61b9cbaf40630db1d5809a419 + - name: Scaffold new kitchen-sink app + id: kitchen-sink + run: | + scaffold new --preset=kitchen-sink --no-prompt $GITHUB_WORKSPACE + cd scaffold_test* + git init + echo "::set-output dir=$PWD" + - name: Test kitchen-sink + working-directory: "${{ steps.kitchen-sink.outputs.dir }}" + run: | + bazel test ... + bazel run format diff --git a/scaffold.yaml b/scaffold.yaml index 751289e..d0ab9dc 100644 --- a/scaffold.yaml +++ b/scaffold.yaml @@ -21,10 +21,11 @@ questions: message: "Languages to be used in the project" options: - "javascript" - - "go" - - "python" - - "java" features: - value: "{{ .Scaffold.fmt }}" globs: - "**/tools/format/*" +presets: + kitchen-sink: + fmt: true + langs: ['javascript']