forked from phoneburner/api-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (30 loc) · 978 Bytes
/
code_quality.yml
File metadata and controls
36 lines (30 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Code Quality Checks
on:
push:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.2", "8.3", "8.4", "8.5"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run Code Quality Checks (PHP ${{ matrix.php-version }})
env:
PHP_VERSION: ${{ matrix.php-version }}
BUILDX_BAKE_CACHE_FROM: type=gha,scope=php-${{ matrix.php-version }}
BUILDX_BAKE_CACHE_TO: type=gha,scope=php-${{ matrix.php-version }},mode=max
run: |
cp .env.dist .env;
sed -i "s/^GITHUB_TOKEN=.*/GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}/" ".env";
sed -i "s/^PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}-cli/" ".env";
rm -f composer.lock;
make -j$(nproc) && make ci;