Repository navigation
stepup-behat #509
Workflow file for this run
This file contains hidden or 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: stepup-behat | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| env: | |
| DOCKER_COMPOSE: docker compose --profile smoketest -f docker-compose.yml | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Get Composer Cache Directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - uses: actions/cache@v5 | |
| 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 | |
| if [ ! -f ../core/haproxy/haproxy.pem ]; then | |
| ../core/scripts/create_dev_ca.sh | |
| fi | |
| # Distribute the dev CA to the app containers: the base image imports | |
| # /config/haproxy/haproxy.crt on startup so services trust each other | |
| # over HAProxy TLS. start-dev-env.sh does this copy; CI must too. | |
| cp ../core/haproxy/haproxy.crt haproxy/haproxy.crt | |
| ${DOCKER_COMPOSE} up -d | |
| - name: Install composer dependencies on the Behat container | |
| run: | | |
| cd stepup | |
| ${DOCKER_COMPOSE} exec behat composer install --ignore-platform-reqs -n | |
| - name: Sleep for 10 seconds | |
| run: sleep 10s | |
| - name: Run Behat tests | |
| run: | | |
| cd stepup | |
| ${DOCKER_COMPOSE} exec behat ./behat | |
| - name: Output logs on failure | |
| if: failure() | |
| run: | | |
| cd stepup | |
| ${DOCKER_COMPOSE} logs |