Skip to content

Commit

Permalink
Use GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Nov 1, 2019
1 parent 8221209 commit a811733
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Test
on:
push:
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [1.12, 1.13]
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go_version }}
id: go

- name: Install codecov
run: sudo pip install codecov

- name: Check out source code
uses: actions/checkout@v1

- name: Start Databases
run: docker-compose up -d && sleep 20s

- name: Run test
run: env PATH=`go env GOPATH`/bin:$PATH make ci
env:
GOPROXY: "https://proxy.golang.org"

- name: Run codecov
run: codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
push:
branches:
- master
jobs:
build:
name: Test BigQuery Integration
runs-on: ubuntu-latest
strategy:
matrix:
go_version: [1.12, 1.13]
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go_version }}
id: go

- name: Check out source code
uses: actions/checkout@v1

- name: Decrypt Secrets
run: gpg --quiet --batch --yes --decrypt --passphrase="$GCP_CLIENT_SECRETS_PASSPHRASE" --output $GITHUB_WORKSPACE/client_secrets.json $GITHUB_WORKSPACE/client_secrets.json.gpg
env:
GCP_CLIENT_SECRETS_PASSPHRASE: $

- name: Run test
run: env PATH=`go env GOPATH`/bin:$PATH make test_bigquery
env:
GOPROXY: "https://proxy.golang.org"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BUILD_LDFLAGS = -X $(PKG).commit=$(COMMIT) -X $(PKG).date=$(DATE)

default: test

ci: build test testdoc test_too_many_tables test_json sec
ci: depsdev build test testdoc test_too_many_tables test_json sec

test:
usql pg://postgres:pgpass@localhost:55432/testdb?sslmode=disable -f testdata/pg.sql
Expand Down
Binary file added client_secrets.json.gpg
Binary file not shown.

0 comments on commit a811733

Please sign in to comment.