diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..6f1d80fbae --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,85 @@ +name: Test + +on: +- push +- pull_request + +env: + MYSQL_ROOT_PASSWORD: root + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 15 + + strategy: + matrix: + php_version: + - 7.2 + - 7.3 + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@master + with: + php-version: ${{ matrix.php_version }} + + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + + - name: Setup environment + run: | + set -e; + + cp .env.testing .env ; + . .env ; + . docker/common.sh ; + wait_for_mysql ; + + cat > $HOME/.my.cnf <