Add check for CLI call in production server #132
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: Go CI build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
mongodb-version: ['4.4.14', '5.0.9', '6.0.11', '7.0.2', 'latest'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Build | |
run: | | |
cd web | |
make | |
- name: Start MongoDB | |
uses: MongoCamp/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
mongodb-port: 8230 | |
- name: Test | |
run: | | |
cd web | |
make test | |
- name: schema check | |
run: | | |
cd web/schemas | |
go build | |
ls *.json | awk '{print "echo \"validate "$1"\"; ./validator -schema "$1""}' | /bin/sh |