Feature/implmenet stream subscription #48
Workflow file for this run
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
name: Generate and test | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'pkg/**' | |
- 'typescript/models/**' | |
jobs: | |
build-app: | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.23' | |
#TODO: Check if generator needs to be run, fail if the generator generates new files | |
- name: run generator | |
run: | | |
echo running generator... | |
go run cmd/generator/main.go | |
git diff --exit-code --numstat pkg/ | |
if [ $? -ne 0 ]; then | |
echo "Generator generated new files, please run the generator locally and commit the changes" | |
exit 1 | |
fi | |
- name: Test | |
run: | | |
echo testing... | |
go get -t ./... | |
go vet ./... | |
go test -v ./... | |
build-typescript-models: | |
defaults: | |
run: | |
working-directory: ./typescript/models | |
permissions: | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm install | |
- name: Test | |
run: npm run build |