Posted on under Laravel by Owen Conti.
The following workflow script can be used as a starting point for building and testing a Laravel application with GitHub Actions:
1name: Build 2on: [push] 3 4jobs: 5 build-js: 6 name: Build JS 7 runs-on: ubuntu-18.04 8 container: 'ohseemedia/laravel-ci:7.3' 9 steps:10 - uses: actions/checkout@v111 - run: yarn install12 - run: yarn run production13 build-php:14 name: Build PHP15 runs-on: ubuntu-18.0416 container: 'ohseemedia/laravel-ci:7.3'17 steps:18 - uses: actions/checkout@v119 - run: composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts20 - name: Configure application21 run: |22 cp .env.example .env23 php artisan cache:clear24 php artisan config:clear25 php artisan key:generate26 - run: ./vendor/bin/phpunit --coverage-text --colors=never
Hopefully you found this article useful! If you did, share it on X!
Found an issue with the article? Submit your edits against the repository.