mirror of
https://github.com/directus/directus.git
synced 2026-01-29 12:38:02 -05:00
* Enable end-to-end tests for Oracle and SQLite * Add Oracle back to allVendors * Use yum * Use dnf * Actually use yum * Actually use dnf * Actually use yum * Try again * Try manual install * Fix env declaration * Bump knex version (because https://github.com/knex/knex/issues/4844) * Set max pool size for Oracle * Add awaitDatabaseConnection * Cache install and build step * Run different tests sequentially * Fix workflow name * Show test results * Fix names * Fix success check * Fix outputs * Add oracle driver install * Fix env * Revert to previous structure to benchmark performance * Only build specs and drive packages for unit tests * Don't install everything to run linters * Use this branch * Fix missing lint dep * Revert "Don't install everything to run linters", also build shared package * Skip app build for tests * Don't serve app for e2e tests * Change time fields to timestamp becaues of inconsistencies between vendors * Make npm ci faster Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
49 lines
964 B
YAML
49 lines
964 B
YAML
name: Unit Tests
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
should_skip:
|
|
required: false
|
|
type: string
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
if: inputs.should_skip != 'true'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
node-version:
|
|
- '16'
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --prefer-offline
|
|
|
|
- name: Build packages
|
|
run: npm run build:api
|
|
|
|
- name: Run tests
|
|
run: npm run test
|
|
env:
|
|
SECRET: TEST_SECRET
|
|
|
|
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
|