Skip to content

Minor updates

Minor updates #2219

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
linter:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@2.32.0
with:
php-version: '8.3'
coverage: none
tools: composer
- name: Install php-cs-fixer
run: cd tools/php-cs-fixer; composer install
- name: Install editorconfig-checker
run: |
mkdir -p /tmp/ec
pushd /tmp/ec
curl -fsSLO https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.8.0/ec-linux-amd64.tar.gz
tar xvf ec-linux-amd64.tar.gz
sudo install bin/ec-linux-amd64 /usr/local/bin/ec
popd
- name: Run editorconfig-checker
run: ec
- name: Run php-cs-fixer
run: |
./tools/php-cs-fixer/vendor/bin/php-cs-fixer \
fix --verbose --dry-run --diff --rules=-no_extra_blank_lines .
tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@2.32.0
with:
php-version: '8.3'
coverage: none
tools: composer
- name: Install dependencies
run: composer install
- name: Set up database
run: touch database/testing.sqlite3
- name: Run migrations
run: php artisan migrate --env=testing
- name: Run tests
run: php artisan test
verify-npm-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Check for build differences
run: |
git add .
git diff --staged --exit-code
verify-git-diff-check:
runs-on: ubuntu-latest
# Run job only if the workflow run was triggered by the pull_request event,
# as we need a base commit to diff against
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: git diff check
run: |
git diff --check ${{ github.event.pull_request.base.sha }}