mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
name: End-to-End Tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
inputs:
|
|
should_skip:
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
if: inputs.should_skip != 'true'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node-version:
|
|
- '16'
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Start databases containers
|
|
run: docker compose -f tests/docker-compose.yml up -d --quiet-pull
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build packages
|
|
run: npm run build
|
|
|
|
- name: Wait for databases to be ready
|
|
run: docker compose -f tests/docker-compose.yml up -d --quiet-pull --no-recreate --wait
|
|
|
|
- name: Run tests
|
|
run: npm run test:e2e
|
|
|
|
result:
|
|
name: Result
|
|
if: inputs.should_skip != 'true' && always()
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: Mark result as failed
|
|
if: needs.test.result != 'success'
|
|
run: exit 1
|