Skip to content

Commit 572f5fc

Browse files
authored
Merge pull request #35 from amazeeio/dev
Replace CircleCI with Github Actions
2 parents 4166cbc + 7151cd3 commit 572f5fc

File tree

3 files changed

+74
-29
lines changed

3 files changed

+74
-29
lines changed

.circleci/config.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Drupal test routine
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
- 'dev'
8+
- 'test/dev'
9+
pull_request:
10+
branches:
11+
- 'main'
12+
13+
jobs:
14+
composer-test-suite:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Composer install
20+
run: |
21+
composer install -n --prefer-dist
22+
composer validate
23+
- name: phpcs checks
24+
run: |
25+
./vendor/bin/phpcs
26+
27+
drupal-test-suite:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Create full set of envvars
31+
uses: FranzDiebold/github-env-vars-action@v2
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
repository: lagoon-examples/drupal-base
36+
path: drupal-base
37+
ref: main
38+
- name: Report versions
39+
run: |
40+
docker version
41+
docker compose version
42+
node -v
43+
yarn -v
44+
- name: Add drupal-integrations override
45+
working-directory: drupal-base
46+
run: |
47+
composer config repositories.amazeeio/drupal_integrations '{"type": "github", "url": "http://github.com/amazeeio/drupal-integrations"}'
48+
composer config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
49+
composer config platform.php 8.3.1
50+
composer require --no-install amazeeio/drupal_integrations:dev-${{ env.CI_ACTION_REF_NAME }}
51+
- name: Pull all images
52+
working-directory: drupal-base
53+
run: |
54+
docker compose pull --ignore-pull-failures
55+
- name: Install test harness
56+
working-directory: drupal-base
57+
run: |
58+
yarn add leia-parser mocha chai@4 command-line-test
59+
- name: Generate test files
60+
working-directory: drupal-base
61+
run: |
62+
yarn leia "TESTING*.md" test -r 2 -s 'Start up tests' -t 'Verification commands' -c 'Destroy tests' --split-file
63+
- name: Run docker compose tests
64+
working-directory: drupal-base
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
run: |
68+
yarn mocha --timeout 900000 test/*compose*.func.js

composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,11 @@
3333
},
3434
"require": {
3535
"drupal/core-composer-scaffold": "*"
36+
},
37+
"config": {
38+
"allow-plugins": {
39+
"drupal/core-composer-scaffold": true,
40+
"dealerdirect/phpcodesniffer-composer-installer": true
41+
}
3642
}
3743
}

0 commit comments

Comments
 (0)