/{mysql-client-tests, .github/}: Iterating on github actions integration

This commit is contained in:
Dustin Brown
2020-08-27 13:30:14 -07:00
parent 6df430a7b7
commit d35b0d2311
2 changed files with 71 additions and 2 deletions
@@ -0,0 +1,68 @@
name: Test MySQL Integrations
on:
pull_request:
branches: [ master ]
jobs:
test:
name: Bats tests for MySQL integrations
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
steps:
- name: Setup Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Setup Python 3.x
uses: actions/setup-python@v2
with:
python-version: ^3.6
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ^12
- name: Create CI Bin
run: |
mkdir -p ./.ci_bin
echo "::add-path::$(pwd)/.ci_bin"
- name: Install Bats
run: |
npm i bats
echo "::add-path::$(pwd)/node_modules/.bin"
working-directory: ./.ci_bin
- name: Install Dolt
working-directory: ./go
run: |
go build -mod=readonly -o ../.ci_bin/dolt ./cmd/dolt/.
go build -mod=readonly -o ../.ci_bin/git-dolt ./cmd/git-dolt/.
go build -mod=readonly -o ../.ci_bin/git-dolt-smudge ./cmd/git-dolt-smudge/.
go build -mod=readonly -o ../.ci_bin/remotesrv ./utils/remotesrv/.
- name: Setup Dolt Config
run: |
dolt config --global --add user.name 'Liquidata Actions'
dolt config --global --add user.email 'actions@liquidata.co'
- uses: actions/setup-java@v1
with:
java-version: '9.0.4' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
- name: Install mysql connector for java
run: |
curl -L -o /mysql-client-tests/java/mysql-connector-java-8.0.21.jar \
https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.21/mysql-connector-java-8.0.21.jar
- name: Install python deps
run: |
pip3 install mysql-connector-python
pip3 install PyMySQL
- name: Install node deps
working-directory: ./mysql-client-tests/node
run: npm install
- name: Test all
run: |
bats --tap mysql-client-tests.bats
working-directory: ./mysql-client-tests
@@ -1,5 +1,6 @@
FROM ubuntu:18.04
COPY . /mysql-client-tests
COPY ./mysql-client-tests /mysql-client-tests
COPY ./go /dolt-go
# install python
ENV DEBIAN_FRONTEND=noninteractive
@@ -67,4 +68,4 @@ RUN npm install
# run tests
WORKDIR /mysql-client-tests
#CMD ["bats", "mysql-client-tests.bats"]