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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test
"on":
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
HHVM_VERSION:
- 3.27-lts-latest
- 3.28.3
- 3.29-latest
- 3.30-latest
- 4.0-latest
- 4.4-latest
- 4.8-latest
- 4.16-latest
- 4.25-latest
- 4.26-latest
- 4.32-latest
- 4.40-latest
- 4.48-latest
- 4.56-latest
- 4.64-latest
# version 4.70 was skipped, testing on hhvm 4.69 instead
- 4.69-latest
- latest
- nightly
container:
image: "hhvm/hhvm:${{ matrix.HHVM_VERSION }}"
steps:
- name: Download latest git
# 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.
run: "add-apt-repository ppa:git-core/ppa && apt-get update && apt-get install -y git"
- uses: actions/checkout@v2
- name: Tests
run: ./ci_entrypoint.sh
4 changes: 1 addition & 3 deletions .travis.sh → ci_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
#!/bin/sh
set -ex
apt update -y
DEBIAN_FRONTEND=noninteractive apt install -y php-cli zip unzip
hhvm --version
php --version

(
cd $(mktemp -d)
curl https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
curl https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=1.10.17
)

canruntests=$(hhvm --php -r "echo HHVM_VERSION_ID >= 32800 ? 'yes' : 'no';")
Expand Down