name: e2e Test Cluster
on: [push, pull_request]
jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - name: Set up Go
      uses: actions/setup-go@v1
      with:
        go-version: 1.13

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

    - name: Get dependencies
      run: |
        sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget
        sudo service mysql stop
        sudo service etcd stop
        sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
        sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
        go mod download

    - name: Run bootstrap.sh
      run: |
        echo "Copying new bootstrap over location of legacy one."
        cp .github/bootstrap.sh .
        ./bootstrap.sh

    - name: Build
      run: |
        GOBIN=$PWD/bin make build

    - name: Run e2e test cluster
      run: |
        export PATH=$PWD/bin:$PATH
        source ./dev.env
        VTDATAROOT=/tmp/vtdataroot VTTOP=$PWD VTROOT=$PWD tools/e2e_test_cluster.sh

Add GitHub action for building new test
Add GitHub action for building new test

Signed-off-by: Morgan Tocker <cfa41afc5ac20f7c1e01316e2d765e1ba4c4bf7a@gmail.com>
