Skip to content

Fix linter warnings #1480

Fix linter warnings

Fix linter warnings #1480

Workflow file for this run

---
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.22
- 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