Skip to content

Commit

Permalink
Merge pull request #34 from City-of-Helsinki/UHF-11031
Browse files Browse the repository at this point in the history
Support php 8.4
  • Loading branch information
tuutti authored Dec 12, 2024
2 parents e91b452 + eb5b800 commit e578987
Show file tree
Hide file tree
Showing 47 changed files with 445 additions and 1,227 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/php-ci.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/php-openshift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install CST
run: |
curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && \
chmod +x container-structure-test-linux-amd64 && \
sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
- name: Run tests
working-directory: openshift/drupal
run: make test-php
126 changes: 0 additions & 126 deletions ci/drupal/Dockerfile

This file was deleted.

65 changes: 0 additions & 65 deletions ci/drupal/Makefile

This file was deleted.

57 changes: 2 additions & 55 deletions ci/drupal/README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,5 @@
# Drupal CI image

Available PHP versions: `8.3`, `8.2`, `8.1`:
CI image is deprecated and no longer updated. Please update your code to use [ghcr.io/city-of-helsinki/drupal-web](/local/drupal) image instead.

- `ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine`
- `ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine`
- `ghcr.io/city-of-helsinki/drupal-php-docker:8.1-alpine`

All images should include all packages necessary to run all Drupal tests.

See:
- [test.yml](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/.github/workflows/test.yml.dist) for an example how to run tests using this image.
- [Automated testing documentation](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/testing.md)

## Environment variables

- `SIMPLETEST_DB=mysql://drupal:drupal@db:3306/drupal`
- `SIMPLETEST_BASE_URL=http://127.0.0.1:8888`
- `COMPOSER_HOME=/tmp/.composer`: The composer home is overridden to mitigate permission issues
- `COMPOSER_MIRROR_PATH_REPOS=1`: Individual module tests use `composer config repositories N $GITHUB_WORKSPACE && composer require drupal/$MODULE_NAME` to symlink module's codebase from $GITHUB_WORKSPACE to public/modules/contrib folder. PHPUnit seems to sometimes report an incorrect test coverage if the test folder is a symlink. This setting changes composer to mirror the content instead of symlinking it. See https://helsinkisolutionoffice.atlassian.net/browse/UHF-8566
- `COMPOSER_DISCARD_CHANGES=true`: Automatically discard uncommitted changes

## Development

### Requirements

- [GoogleContainerTools/container-structure-test](https://github.com/GoogleContainerTools/container-structure-test)

### Building

To build a specific image, call:

- `8.1-alpine` tag: `make build-php81`

To run built image locally:

- `8.1-alpine` tag: `make run-php81`

### Testing

We use [GoogleContainerTools/container-structure-test](https://github.com/GoogleContainerTools/container-structure-test) to test images. See [tests/](tests/) for available tests.

Running tests will always rebuild the image first.

- Run tests against `8.1-alpine` tag: `make test-php81`

### Release process

Calling `make push-php*` will:
- Run the build script
- Run all tests
- Push the image to docker repository

Release a specific tag:

- Release `8.1-alpine` tag: `make push-php81`

Release all tags at once: `make push-php`.
See [Docker image](/local/drupal/README.md) and [Drupal Platform testing](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/testing.md) documentation for more information.
56 changes: 0 additions & 56 deletions ci/drupal/tests/php.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions ci/drupal/tests/php81.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions ci/drupal/tests/php82.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions ci/drupal/tests/php83.yaml

This file was deleted.

Loading

0 comments on commit e578987

Please sign in to comment.