-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.6 KB
/
test.yml
File metadata and controls
65 lines (56 loc) · 1.6 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Tests and Checks
on:
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
max-parallel: 3
matrix:
php_version:
- '5.4'
- '7.0'
- '7.1'
- '7.2'
- '7.3'
- '7.4'
steps:
- name: Checkouting code...
uses: actions/checkout@v6
- name: Read Node.js version from package.json
id: node-version
run: |
NODE_VERSION=$(jq -r '.engines.node // empty' package.json)
if [[ -z "$NODE_VERSION" || "$NODE_VERSION" == "null" ]]; then
echo "package.json engines.node is required" >&2
exit 1
fi
echo "version=$NODE_VERSION" >> "$GITHUB_OUTPUT"
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ steps.node-version.outputs.version }}
- name: Enable legacy Docker schema v1 pulls for old PHP tags
run: |
sudo mkdir -p /etc/systemd/system/docker.service.d
cat <<'EOF' | sudo tee /etc/systemd/system/docker.service.d/10-enable-schema1.conf
[Service]
Environment=CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
docker version
- name: Install dependencies
run: npm ci
- name: Run integration tests
run: npm test
env:
PHP_VERSION: ${{ matrix.php_version }}