From 98c7ed1d27663956baeddd6b358d72c7504e7d60 Mon Sep 17 00:00:00 2001 From: David Losada Date: Sat, 18 Apr 2020 18:42:34 +0200 Subject: [PATCH 1/2] ci(github): run tests on github actions --- .github/workflows/test.yml | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..72a9619b0f --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,74 @@ +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: Setup environment + run: | + set -e; + + cp .env.testing .env ; + . .env ; + . docker/common.sh ; + wait_for_mysql ; + + cat > $HOME/.my.cnf < Date: Sun, 19 Apr 2020 17:04:51 +0200 Subject: [PATCH 2/2] ci(github): add composer caching --- .github/workflows/test.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72a9619b0f..6f1d80fbae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,6 +25,17 @@ jobs: 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: |