Skip to content

Commit

Permalink
ci: verify that generated project can build and test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed May 10, 2024
1 parent b25c1e7 commit 28bbd67
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
7 changes: 4 additions & 3 deletions scaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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']

0 comments on commit 28bbd67

Please sign in to comment.