-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run Behat tests on Github Actions workflow
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
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
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-compose exec -T behat bash -lc "composer install --ignore-platform-reqs -n" | ||
- name: Run Behat tests | ||
run: | | ||
cd stepup | ||
docker-compose exec -T behat bash -lc "./behat" | ||
- name: Output logs on failure | ||
if: failure() | ||
run: docker compose logs |