Skip to content

Commit 629ef26

Browse files
Github: Run composer install --no-dev with various PHP versions
Clockwork currently supports 7.1 - 8.4, so it should better work with them.
1 parent 29095a5 commit 629ef26

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Test Installation With Different PHP Versions
2+
3+
on: [push]
4+
5+
jobs:
6+
run-composer-install:
7+
name: Run Composer Install
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
php-version:
13+
- "7.1"
14+
- "7.2"
15+
- "7.3"
16+
- "7.4"
17+
- "8.0"
18+
- "8.1"
19+
- "8.2"
20+
- "8.3"
21+
- "8.4"
22+
23+
steps:
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: "${{ matrix.php-version }}"
28+
extensions: json, xdebug
29+
tools: composer:v2
30+
31+
- name: Check Out Code
32+
uses: actions/checkout@v2
33+
34+
- name: Get Composer Cache Directory
35+
id: composer-cache
36+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
37+
38+
- name: Connect Downloaded Dependencies With A Cache In GitHub
39+
uses: actions/cache@v3
40+
with:
41+
path: ${{ steps.composer-cache.outputs.dir }}
42+
# Note: Normally, we'd use the composer.lock to generate a hash,
43+
# but the lock file is currently not versioned.
44+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
45+
restore-keys: ${{ runner.os }}-composer-
46+
47+
- name: Install Production Dependencies
48+
run: composer install --no-dev --prefer-dist

0 commit comments

Comments
 (0)