From f068a1af822a1a0a1579fe679364d2814ddeb620 Mon Sep 17 00:00:00 2001 From: Arno Stalpaert Date: Sat, 29 Oct 2022 16:34:01 +0200 Subject: [PATCH 1/2] Add command as listed in composer.json --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index d0526a9..220c400 100644 --- a/composer.json +++ b/composer.json @@ -47,5 +47,10 @@ "Elasticsearch": "AviationCode\\Elasticsearch\\Facades\\Elasticsearch" } } + }, + "scripts": { + "test": [ + "vendor/bin/phpunit" + ] } } From 1903952b0906c719a0b05408c5eb20027b1315b0 Mon Sep 17 00:00:00 2001 From: Arno Stalpaert Date: Sat, 29 Oct 2022 16:34:22 +0200 Subject: [PATCH 2/2] Setup github workflow --- .github/workflows/run-tests.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/run-tests.yml diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..fa8d80c --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,32 @@ +name: run-tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + run-tests: + runs-on: ubuntu-latest + + steps: + - name: Update apt + run: sudo apt-get update --fix-missing + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, iconv, imagick, intl + coverage: none + env: + COMPOSER_AUTH_JSON: ${{ secrets.COMPOSER_AUTH_JSON }} + + - name: Install dependencies + run: composer install --prefer-dist --no-interaction + + - name: Execute tests + run: composer test \ No newline at end of file