-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore the github workflow changes for now
- Loading branch information
Showing
2 changed files
with
76 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
|
||
--- | ||
name: Validation | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
container: node:12-slim | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npx @stoplight/[email protected] lint schema/public.openapi.yaml | ||
- run: npx @stoplight/[email protected] lint schema/private.openapi.yaml | ||
|
||
golang: | ||
runs-on: ubuntu-20.04 | ||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_DB: insights | ||
POSTGRES_USER: insights | ||
POSTGRES_PASSWORD: insights | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.18 | ||
|
||
- run: make build | ||
- run: go vet . | ||
|
||
- run: CLOWDER_ENABLED=false make test | ||
|
||
- name: test down migrations | ||
run: make migrate-db-undo-all | ||
|
||
# Check that the code generated from the OpenAPI schema is up-to-date (i.e. make generate-api has been run after changing the openapi schema) | ||
- name: test openapi schema up to date | ||
run: make init && cp internal/api/controllers/private/spec.gen.go internal/api/controllers/private/spec.gen.go.bak && make generate-api && diff internal/api/controllers/private/spec.gen.go internal/api/controllers/private/spec.gen.go.bak | ||
env: | ||
GOPATH: /home/runner/go | ||
|
||
java: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Maven dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Build with Maven | ||
run: mvn -f event-streams/pom.xml clean verify |