Skip to content

Commit

Permalink
Merge pull request #35 from amazeeio/dev
Browse files Browse the repository at this point in the history
Replace CircleCI with Github Actions
  • Loading branch information
tobybellwood authored Aug 28, 2024
2 parents 4166cbc + 7151cd3 commit 572f5fc
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 29 deletions.
29 changes: 0 additions & 29 deletions .circleci/config.yml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/drupal-integrations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Drupal test routine

on:
push:
branches:
- 'main'
- 'dev'
- 'test/dev'
pull_request:
branches:
- 'main'

jobs:
composer-test-suite:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Composer install
run: |
composer install -n --prefer-dist
composer validate
- name: phpcs checks
run: |
./vendor/bin/phpcs
drupal-test-suite:
runs-on: ubuntu-latest
steps:
- name: Create full set of envvars
uses: FranzDiebold/github-env-vars-action@v2
- name: Checkout
uses: actions/checkout@v4
with:
repository: lagoon-examples/drupal-base
path: drupal-base
ref: main
- name: Report versions
run: |
docker version
docker compose version
node -v
yarn -v
- name: Add drupal-integrations override
working-directory: drupal-base
run: |
composer config repositories.amazeeio/drupal_integrations '{"type": "github", "url": "http://github.com/amazeeio/drupal-integrations"}'
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
composer config platform.php 8.3.1
composer require --no-install amazeeio/drupal_integrations:dev-${{ env.CI_ACTION_REF_NAME }}
- name: Pull all images
working-directory: drupal-base
run: |
docker compose pull --ignore-pull-failures
- name: Install test harness
working-directory: drupal-base
run: |
yarn add leia-parser mocha chai@4 command-line-test
- name: Generate test files
working-directory: drupal-base
run: |
yarn leia "TESTING*.md" test -r 2 -s 'Start up tests' -t 'Verification commands' -c 'Destroy tests' --split-file
- name: Run docker compose tests
working-directory: drupal-base
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn mocha --timeout 900000 test/*compose*.func.js
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,11 @@
},
"require": {
"drupal/core-composer-scaffold": "*"
},
"config": {
"allow-plugins": {
"drupal/core-composer-scaffold": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}

0 comments on commit 572f5fc

Please sign in to comment.