feat: install linting (#2) #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
preset: | |
- kitchen-sink | |
- js | |
- py | |
- minimal | |
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/[email protected] | |
- name: Scaffold new app | |
id: scaffold | |
run: | | |
scaffold new --preset=${{ matrix.preset }} --no-prompt $GITHUB_WORKSPACE | |
cd scaffold_test* | |
git init | |
echo "::set-output name=dir::$PWD" | |
- run: bazel test ... | |
working-directory: "${{ steps.scaffold.outputs.dir }}" | |
- run: bazel run format | |
working-directory: "${{ steps.scaffold.outputs.dir }}" | |
if: "${{ matrix.preset != 'minimal' }}" | |
- run: bazel lint ... | |
working-directory: "${{ steps.scaffold.outputs.dir }}" |