Skip to content

epic: mvp index

epic: mvp index #8

Workflow file for this run

name: Test Suite
on:
pull_request:
branches: [main, epic/*]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: ["unit", "acceptance"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependenices
uses: ./.github/actions/install
- name: Setup environment
shell: bash
run: envsubst < tests/.env.example > tests/.env
- name: Cache Docker images.
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ hashFiles('docker-compose.yml') }}
- name: Build testing files
shell: bash
run: php vendor/bin/codecept build
- name: Setup docker
shell: bash
run: sudo bin/test-up.sh
- name: Run unit tests
if: matrix.test != 'acceptance'
run: bin/test-run.sh ${{ matrix.test }}
- name: Run acceptance tests
if: matrix.test == 'acceptance'
run: php vendor/bin/codecept run acceptance
- name: Upload codeception output
if: ${{ failure() }}
uses: actions/[email protected]
with:
name: "${{ matrix.test }}-output"
path: "./tests/_output"
- name: Stop testing container
shell: bash
run: bin/test-down.sh