add github action #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Drupal test routine | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'dev' | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
test-suite: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push local | |
uses: docker/bake-action@v5 | |
with: | |
load: true | |
set: | | |
*.platform=linux/amd64 | |
cli.tags=drupal-base-cli:latest | |
nginx.tags=drupal-base-nginx:latest | |
php.tags=drupal-base-php:latest | |
- name: replace docker-compose.yml | |
run: | | |
mv docker-compose.images.yml docker-compose.yml | |
- name: Install test harness | |
run: | | |
yarn add leia-parser mocha chai@4 command-line-test | |
- name: Generate test files | |
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 | |
run: | | |
yarn mocha --timeout 900000 test/*compose*.func.js |