Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
ci: switch from GitHub actions to Buildkite
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih committed May 19, 2021
1 parent 1e178f7 commit 79784a0
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 106 deletions.
12 changes: 12 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
steps:
- name: "Go build and test %n"
command: make
plugins:
- docker-compose#v3.7.0:
run: app

- name: "Check licenses %n"
command: make licensed
plugins:
- docker-compose#v3.7.0:
run: licensing
61 changes: 0 additions & 61 deletions .github/workflows/ci.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/licensed.yml

This file was deleted.

21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.PHONY: all
all: build test lint

.PHONY: test
test:
go test ./...

.PHONY: build
build:
go build ./...

.PHONY: lint
lint:
@go install honnef.co/go/tools/cmd/staticcheck@latest
@staticcheck ./...

.PHONY: licensed
licensed:
licensed cache
licensed status

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sql-proxy
# sql-proxy [![Build status](https://badge.buildkite.com/ca3f602492e4918255dec82c84067f2bb2349d4a4cb85600fe.svg?branch=main)](https://buildkite.com/planetscale/sql-proxy)

The SQL Proxy allows a user with the appropriate permissions to connect to a
PlanetScale database without having to deal with IP whitelisting or SSL
Expand Down
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '2'

services:
app:
image: golang:1.16.4
volumes:
- .:/work
working_dir: /work

licensing:
build:
context: ./docker
dockerfile: Dockerfile.licensed
volumes:
- .:/work
working_dir: /work
5 changes: 5 additions & 0 deletions docker/Dockerfile.licensed
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM golang:1.16-buster

RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y ruby-dev rubygems ruby cmake pkg-config git-core libgit2-dev
RUN gem install licensed
2 changes: 1 addition & 1 deletion proxy/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestClient_SyncAtomicAlignment(t *testing.T) {
// copied from: https://github.com/GoogleCloudPlatform/cloudsql-proxy/blob/302d5d87ac52d8b814625f7b27344fd9ba6a0348/proxy/proxy/client_test.go#L290
// The sync/atomic pkg has a bug that requires the developer to guarantee
// 64-bit alignment when using 64-bit functions on 32-bit systems.
client := &Client{} //nolint: staticcheck
client := &Client{} //lint:ignore SA4006 it's used below
offset := unsafe.Offsetof(client.connectionsCounter)
c.Assert(int(offset%64), qt.Equals, 0, qt.Commentf("Client.connectionsCounter is not aligned"))
}
Expand Down

0 comments on commit 79784a0

Please sign in to comment.