Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI issues due to composer v2, include GitHub Action proof of concept #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

copperwall
Copy link
Contributor

Hey there 👋

It looks like composer recently upgraded to v2, which is now installed
by default by the composer installer script. Some of the older HHVM versions were failing in CI due to certain versions of hhvm-autoload having dependencies that required composer v1 instead of v2. The installer script does
allow a --version flag, but requires a specific version instead of 1.x, so I opted for the most recent v1 version, 1.10.17. Using v1 seems to fix the test suite for older HHVM versions.

I was trying to use travis-ci.org for CI on my fork of this repo but it
was taking an hour and a half for a build to go through (and apparently
travis-ci.org is being made read-only at the end of the year in favor of
travis-ci.com). I thought I'd try making a GitHub Action to run tests
instead to see if migrating would be that hard.

This adds a Test workflow to run a CI matrix on almost all of the same
HHVM versions that the travis.yml specifies. I removed versions 3.25.3
and 3.26.3 because they were failing due to not supporting varrays
(this was happening on travis as well), as well as renamed .travis.sh
to ci-entrypoint.sh since the script still works totally find as an
entrypoint for the hhvm/hhvm docker image that runs the test suite.

I totally realize the GitHub Action change is unsolicited, so if that doesn't fit in with the plan for CI for this repo feel free to close the PR. I made sure to segment out the changes to using composer v1 in a separate commit so I could at least make a PR with that change to fix the current issues on Travis.

It looks like composer recently upgraded to v2, which is now installed
by default by the composer installer script. The installer script does
allow a --version flag, but requires a specific version instead of 1.x,
so I opted for the most recent v1 version, 1.10.17.

This also removes the apt calls because the php-cli is already included in
the hhvm/hhvm docker images, and zip and unzip appeared unused. Removing
the apt commands also speeds up the test build by a good five or so
seconds.
I was trying to use travis-ci.org for CI on my fork of this repo but it
was taking an hour and a half for a build to go through (and apparently
travis-ci.org is being made read-only at the end of the year in favor of
travis-ci.com). I thought I'd try making a GitHub Action to run tests
instead to see if migrating would be that hard.

This adds a `Test` workflow to run a CI matrix on almost all of the same
HHVM versions that the `travis.yml` specifies. I removed versions 3.25.3
and 3.26.3 because they were failing due to not supporting `varray`s
(this was happening on travis as well), as well as renamed `.travis.sh`
to `ci-entrypoint.sh` since the script still works totally find as an
entrypoint for the hhvm/hhvm docker image that runs the test suite.
This is necessary to make sure the git command in the docker image is at least version 2.18.
Some older hhvm/hhvm:$version images have old versions of git and the actions/checkout action
downloads the repo archive over HTTP in that case. This breaks CI because the test
directory is excluded in HTTP archives in order to make the composer package size smaller by not
including unnecessary files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant