-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.17 KB
/
push.yml
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
on: push
name: Goss tests
jobs:
php-versions:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.php-versions.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Lookup PHP versions from Dockerfile-* names
run: echo ::set-output name=matrix::$(ls Dockerfile-* | cut -c 12- | jq --raw-input --slurp 'split("\n") | map(select(. != ""))')
id: php-versions
goss_test:
name: Goss test
runs-on: ubuntu-latest
needs: php-versions
strategy:
fail-fast: false
matrix:
php: ${{ fromJSON(needs.php-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: Run hadolint
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile-${{ matrix.php }}
trusted-registries: docker.io
- uses: e1himself/[email protected]
- name: Build image
run: |
docker build --file=Dockerfile-${{ matrix.php }} -t docker-drupal-php7-fpm:sut .
- name: Test image
run: |
# Sleep a bit to ensure that PHP-FPM has time to start up.
GOSS_SLEEP=15 dgoss run -e GOSS_PHP_VERSION="${{ matrix.php }}" docker-drupal-php7-fpm:sut