Skip to content

Commit

Permalink
Run Behat tests on Github Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MKodde committed Feb 20, 2024
1 parent 384efca commit a6d2399
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/stepup-behat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit a6d2399

Please sign in to comment.