Skip to content

Commit

Permalink
Migrate to Github Actions from Travis CI (#4393)
Browse files Browse the repository at this point in the history
* DX-4293: Migrate to Github Actions from Travis CI

* Add dependencies

* no nvm

* human names

* Patch ORCA

* actions not travis

* fail fast

* fail fast is already default

* disable travis

* orca haxx

* https

* composer args

* sort order

* PHP 7.4

* php 7.3, xdebug2

* Revert "sort order"

This reverts commit 5a5178a.

* after success / failure

* php version env var

* step id

* Revert "step id"

This reverts commit e38d7ac.

* Revert "php version env var"

This reverts commit 2a19d31.

* Add ORCA_JOB once

* PHP 8 test

* matrix

* Build matrix

* failing

* Upstream changes

* Fix branch

* composer create-project

* match upstream jobs

* incompatible with 8.x

* fix failing jobs
  • Loading branch information
danepowell authored Sep 24, 2021
1 parent 052ef96 commit 62a80cc
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 103 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/orca.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: ORCA CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow-failure }}
env:
ORCA_SUT_NAME: acquia/blt
ORCA_SUT_BRANCH: main
ORCA_VERSION: dev-develop
ORCA_PHPCS_STANDARD: AcquiaDrupalStrict
BLT_PRINT_COMMAND_OUTPUT: 1
ORCA_JOB: ${{ matrix.orca-job }}
strategy:
matrix:
orca-job:
- STATIC_CODE_ANALYSIS
- INTEGRATED_TEST_ON_OLDEST_SUPPORTED
- INTEGRATED_TEST_ON_PREVIOUS_MINOR
- INTEGRATED_UPGRADE_TEST_FROM_PREVIOUS_MINOR
- ISOLATED_TEST_ON_CURRENT
- INTEGRATED_TEST_ON_CURRENT
- INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR
- ISOLATED_TEST_ON_CURRENT_DEV
- INTEGRATED_TEST_ON_CURRENT_DEV
- STRICT_DEPRECATED_CODE_SCAN
- ISOLATED_TEST_ON_NEXT_MINOR
- INTEGRATED_TEST_ON_NEXT_MINOR
- ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_BETA_OR_LATER
php-version: [ "7.3" ]
allow-failure: [ false ]
include:
- orca-job: ISOLATED_TEST_ON_CURRENT
php-version: "8.0"
allow-failure: false

- orca-job: INTEGRATED_UPGRADE_TEST_TO_NEXT_MINOR_DEV
php-version: "7.3"
allow-failure: true

- orca-job: LOOSE_DEPRECATED_CODE_SCAN
php-version: "7.3"
allow-failure: true

- orca-job: ISOLATED_TEST_ON_NEXT_MINOR_DEV
php-version: "7.3"
allow-failure: true

- orca-job: INTEGRATED_TEST_ON_NEXT_MINOR_DEV
php-version: "7.3"
allow-failure: true

- orca-job: ISOLATED_UPGRADE_TEST_TO_NEXT_MAJOR_DEV
php-version: "7.3"
allow-failure: true
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 12.x

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug2

- name: Before install
run: |
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION"
../orca/bin/ci/before_install.sh
- name: Install
run: ../orca/bin/ci/install.sh

- name: Before script
run: ../orca/bin/ci/before_script.sh

- name: Script
run: ../orca/bin/ci/script.sh

- name: After script
run: ../orca/bin/ci/after_script.sh

- name: After success
if: ${{ success() }}
run: ../orca/bin/ci/after_success.sh

- name: After failure
if: ${{ failure() }}
run: ../orca/bin/ci/after_failure.sh
102 changes: 0 additions & 102 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/phpunit/src/SetupGitHooksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ protected function assertGitHookSetupValidity(array $hooks, array $disabled_hook
foreach ($hooks as $hook => $path) {
$project_hook = $this->sandboxInstance . '/.git/hooks' . "/$hook";
if (array_key_exists($hook, $disabled_hooks)) {
$this->assertFileNotExists($project_hook, "Failed asserting that the disabled {$hook} hook was not setup.");
$this->assertFileDoesNotExist($project_hook, "Failed asserting that the disabled {$hook} hook was not setup.");
}
else {
$this->assertFileExists($project_hook, "Failed asserting that the enabled {$hook} hook was setup.");
Expand Down

0 comments on commit 62a80cc

Please sign in to comment.