chore(release): release 1.7.1 #5780
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Lighthouse CI | |
on: | |
push: | |
branches: [dev, staging, production] | |
pull_request: | |
branches: [dev, staging, production] | |
jobs: | |
lighthouse-ci: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [8.4] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} # https://github.com/GoogleChrome/lighthouse-ci/issues/172 | |
- uses: greguintow/get-diff-action@v7 | |
id: git-diff | |
with: | |
PATTERNS: | | |
composer.json | |
composer.lock | |
**/*.php | |
package.json | |
package-lock.json | |
**/*.css | |
**/*.js" | |
- name: Set up PHP | |
if: steps.git-diff.outputs.diff | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
- name: Get composer cache directory | |
if: steps.git-diff.outputs.diff | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
if: steps.git-diff.outputs.diff | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Dependencies | |
if: steps.git-diff.outputs.diff | |
run: composer install -q --no-dev --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Set up Node | |
if: steps.git-diff.outputs.diff | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: npm | |
- name: Install dependencies | |
if: steps.git-diff.outputs.diff | |
run: npm ci | |
- name: Create test database | |
if: steps.git-diff.outputs.diff | |
run: | | |
sudo systemctl start mysql.service | |
mysqladmin create accessibilityexchange --user="root" --password="root" | |
- name: Copy .env | |
if: steps.git-diff.outputs.diff | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Generate keys | |
if: steps.git-diff.outputs.diff | |
run: | | |
echo "CIPHERSWEET_KEY=\"$(openssl rand -hex 32)\"" >> .env | |
php artisan key:generate | |
- name: Run Laravel Server | |
if: steps.git-diff.outputs.diff | |
run: | | |
php artisan migrate | |
php artisan storage:link | |
php artisan serve & | |
env: | |
DB_PASSWORD: root | |
DB_HOST: localhost | |
- name: Run Lighthouse CI | |
if: steps.git-diff.outputs.diff | |
run: | | |
npm install -g @lhci/[email protected] | |
lhci autorun | |
env: | |
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} |