From a6665c0239e03d0c1f7468209e052dbfc48bb2a9 Mon Sep 17 00:00:00 2001 From: Henry Whitaker <36062479+henrywhitaker3@users.noreply.github.com> Date: Mon, 3 Aug 2020 12:07:01 +0100 Subject: [PATCH] Create laravel.yml --- .github/workflows/laravel.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/laravel.yml diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml new file mode 100644 index 00000000..1608bb5b --- /dev/null +++ b/.github/workflows/laravel.yml @@ -0,0 +1,38 @@ +name: Laravel + +on: + push: + branches: [ master, dev ] + pull_request: + branches: [ master, dev ] + +jobs: + laravel-tests: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Copy .env + run: php -r "file_exists('.env') || copy('.env.example', '.env');" + - name: Install Dependencies + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist + - name: Generate key + run: php artisan key:generate + - name: Generate JWT key + run: php artisan jwt:secret + - name: Directory Permissions + run: chmod -R 777 storage bootstrap/cache + - name: Create Database + run: | + mkdir -p database + touch database/database.sqlite + - name: Download Speedtest binary + run: wget https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-x86_64-linux.tgz -O speedtest.tgz && tar zxvf speedtest.tgz && mv speedtest app/Bin/ + - name: Accept EULA + run: php artisan speedtest:eula + - name: Execute tests (Unit and Feature tests) via PHPUnit + env: + DB_CONNECTION: sqlite + DB_DATABASE: database/database.sqlite + run: vendor/bin/phpunit