-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (37 loc) · 1.24 KB
/
stepup-behat.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
name: stepup-behat
on:
pull_request:
push:
branches: [ main, feature/*, bugfix/* ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Init environment
run: |
cd stepup
cp .env.test .env
cp gateway/surfnet_yubikey.yaml.dist gateway/surfnet_yubikey.yaml
docker compose -f docker-compose.yml -f docker-compose-behat.yml up -d
- name: Install composer dependencies on the Behat container
run: |
cd stepup
docker exec -t stepup-behat-1 bash -lc "composer install --ignore-platform-reqs -n"
- name: Run Behat tests
run: |
cd stepup
docker exec -t stepup-behat-1 bash -lc "./behat"
- name: Output logs on failure
if: failure()
run: docker compose logs