Add Enlightn to the workflow

This commit is contained in:
Paras Malhotra
2021-03-04 18:06:10 +05:30
parent bc7488cf96
commit d75e26e474
5 changed files with 731 additions and 126 deletions

40
.github/workflows/enlightn.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Run Enlightn Checks
on: [pull_request]
jobs:
tests:
name: Enlightn
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: bcmath, ctype, dom, fileinfo, intl, gd, json, mbstring, pdo, pdo_sqlite, openssl, sqlite, xml, zip
coverage: none
- name: Install dependencies
env:
ENLIGHTN_USERNAME: ${{ secrets.ENLIGHTN_USERNAME }}
ENLIGHTN_API_TOKEN: ${{ secrets.ENLIGHTN_API_TOKEN }}
run: |
composer config http-basic.satis.laravel-enlightn.com "$ENLIGHTN_USERNAME" "$ENLIGHTN_API_TOKEN"
composer config repositories.enlightn composer https://satis.laravel-enlightn.com
composer require --prefer-dist --no-interaction enlightn/enlightnpro
- name: Run Enlightn Checks and Trigger the Enlightn Bot
env:
ENLIGHTN_USERNAME: ${{ secrets.ENLIGHTN_USERNAME }}
ENLIGHTN_API_TOKEN: ${{ secrets.ENLIGHTN_API_TOKEN }}
ENLIGHTN_GITHUB_REPO: ${{ github.repository }}
APP_ENV: local
run: |
cp .env.example .env
php artisan enlightn --ci --report --review --issue=${{ github.event.number }}