Skip to content

Merge pull request #97 from reload/dependabot/github_actions/docker/b… #94

Merge pull request #97 from reload/dependabot/github_actions/docker/b…

Merge pull request #97 from reload/dependabot/github_actions/docker/b… #94

Workflow file for this run

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