Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint CI + replace travis with GH workflow #150

Merged
merged 4 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/golang-ci-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Golang CI Workflow

on: push

jobs:
ci:
name: golang-ci
runs-on: ubuntu-latest
env:
COVERAGE_PROFILE_OUTPUT_LOCATION: "./profile.cov"
PGDATABASE: arborist_test
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: localhost
PGPORT: 5432
PGSSLMODE: disable
services:
postgres:
image: postgres:9.6
env:
POSTGRES_DB: ${{ env.PGDATABASE }}
POSTGRES_USER: ${{ env.PGUSER }}
POSTGRES_PASSWORD: ${{ env.PGPASSWORD }}
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup database
shell: bash
run: ./migrations/latest
- name: Run tests, lint code, install goveralls
uses: uc-cdis/.github/.github/actions/golang-ci@master
with:
GO_VERSION: "1.17"
TESTS_LOCATION: ./arborist/
COVERAGE_PROFILE_OUTPUT_LOCATION: ${{ env.COVERAGE_PROFILE_OUTPUT_LOCATION }}
- name: Send coverage to coveralls using goveralls
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=${{ env.COVERAGE_PROFILE_OUTPUT_LOCATION }} -service=github
38 changes: 0 additions & 38 deletions .github/workflows/golangci-lint.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/image_build_push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Build and Push Image

on: push

jobs:
ci:
name: Build and Push Image
uses: uc-cdis/.github/.github/workflows/image_build_push.yaml@master
secrets:
ECR_AWS_ACCESS_KEY_ID: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ECR_AWS_SECRET_ACCESS_KEY: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_ROBOT_TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.dll
*.so
*.dylib
bin/

# Test binary, built with `go test -c`
*.test
Expand Down
12 changes: 10 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"exclude": {
"files": "go.sum",
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2022-02-11T04:54:33Z",
"generated_at": "2022-06-03T15:26:18Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -58,6 +58,14 @@
}
],
"results": {
".github/workflows/golang-ci-workflow.yaml": [
{
"hashed_secret": "afc848c316af1a89d49826c5ae9d00ed769415f3",
"is_verified": false,
"line_number": 13,
"type": "Secret Keyword"
}
],
"docs/openapi.yaml": [
{
"hashed_secret": "f9fdc64928c96c7ad56bf7da557f70345d83a6ed",
Expand Down
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

4 changes: 0 additions & 4 deletions arborist/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import (
"net/http"
)

type responseJSON interface {
write(w http.ResponseWriter, r *http.Request) error
}

type jsonResponse struct {
content interface{}
code int
Expand Down
Loading