-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (25 loc) · 901 Bytes
/
run-tests.yml
File metadata and controls
35 lines (25 loc) · 901 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
name: Run tests
on: [pull_request]
permissions:
contents: read
jobs:
php-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.3, 8.2, 8.1, 8.0, 7.4]
dependency-version: [prefer-lowest, prefer-stable]
os: [ubuntu-latest]
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t lib_delivery_sdk_ci --build-arg PHP_VER=${{ matrix.php }} .
- name: Run tests in Docker container
run: |
docker run --rm \
-u root \
-v $GITHUB_WORKSPACE:/var/www \
lib_delivery_sdk_ci \
/bin/bash -c "mkdir -p /var/www/vendor && composer install --no-cache --no-interaction --no-progress --ignore-platform-reqs && composer run phpunit"