-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (32 loc) · 1.07 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Test LocalGov Drupal
on:
push:
branches:
- php*
pull_request:
branches:
- php*
jobs:
test:
name: Build and test LocalGov Drupal
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
localgov-version:
- '3.x'
steps:
- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- uses: actions/checkout@v2
- name: Create LocalGov Drupal project
run: composer create-project --stability dev localgovdrupal/localgov-project ./html "${{ matrix.localgov-version }}"
- name: Obtain all dev dependencies for LocalGov Drupal
run: jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction
- name: Start Docker environment
run: docker-compose up -d
- name: Run tests
run: ./run-tests.sh
shell: bash