Skip to content

Commit

Permalink
Migrate CockroachDB SSL tests to GitHub actions (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislas-m committed Dec 7, 2019
1 parent ce5cc01 commit 8330442
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 92 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,87 @@ jobs:
run: |
go test -tags sqlite -race ./...
crdbssl-tests:
name: Cockroach SSL tests
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Checkout Code
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Get dependencies
run: |
go get -v -tags sqlite -t -d ./...
- name: Install Cockroach SSL
run: |
mkdir -p crdb/certs
pushd crdb
wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.0.linux-amd64.tgz | tar zxv
mv cockroach-v2.1.0.linux-amd64/cockroach .
./cockroach cert create-ca --certs-dir certs --ca-key key
./cockroach cert create-client root --certs-dir certs --ca-key key
./cockroach cert create-node localhost 127.0.0.1 `hostname -s` `hostname -f` --certs-dir certs --ca-key key
./cockroach start --certs-dir certs --listen-addr localhost --port 26259 --http-port 8089 --background
popd
- name: Build and run soda
env:
SODA_DIALECT: "cockroach_ssl"
run: |
go build -v -tags sqlite -o tsoda ./soda
./tsoda drop -e $SODA_DIALECT -p ./testdata/migrations
./tsoda create -e $SODA_DIALECT -p ./testdata/migrations
./tsoda migrate -e $SODA_DIALECT -p ./testdata/migrations
- name: Test
env:
SODA_DIALECT: "cockroach_ssl"
run: |
go test -tags sqlite -race ./...
crdb-tests:
name: Cockroach tests
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Checkout Code
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Get dependencies
run: |
go get -v -tags sqlite -t -d ./...
- name: Install Cockroach
run: |
mkdir -p crdb
pushd crdb
wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.0.linux-amd64.tgz | tar zxv
mv cockroach-v2.1.0.linux-amd64/cockroach .
./cockroach start --insecure --background
popd
- name: Build and run soda
env:
SODA_DIALECT: "cockroach"
run: |
go build -v -tags sqlite -o tsoda ./soda
./tsoda drop -e $SODA_DIALECT -p ./testdata/migrations
./tsoda create -e $SODA_DIALECT -p ./testdata/migrations
./tsoda migrate -e $SODA_DIALECT -p ./testdata/migrations
- name: Test
env:
SODA_DIALECT: "cockroach"
run: |
go test -tags sqlite -race ./...
sqlite-tests:
name: SQLite tests
runs-on: ${{ matrix.os }}
Expand Down
23 changes: 0 additions & 23 deletions azure-pipelines.yml

This file was deleted.

69 changes: 0 additions & 69 deletions azure-tests.yml

This file was deleted.

0 comments on commit 8330442

Please sign in to comment.