mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Run blackbox tests in parallel (#16048)
* Run blackbox tests in parallel * Add slight delay for updates in timezone tests * Revert trigger on PR
This commit is contained in:
2
.github/actions/prepare/action.yml
vendored
2
.github/actions/prepare/action.yml
vendored
@@ -14,7 +14,7 @@ runs:
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- uses: pnpm/action-setup@v2.2.2
|
||||
- uses: pnpm/action-setup@v2.2.4
|
||||
name: Install pnpm
|
||||
id: pnpm-install
|
||||
with:
|
||||
|
||||
20
.github/workflows/blackbox-main.yml
vendored
20
.github/workflows/blackbox-main.yml
vendored
@@ -21,8 +21,20 @@ env:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: All Databases
|
||||
name: ${{ matrix.vendor }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
vendor:
|
||||
- sqlite3
|
||||
- postgres
|
||||
- postgres10
|
||||
- mysql
|
||||
- maria
|
||||
- mssql
|
||||
- oracle
|
||||
- cockroachdb
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
@@ -31,6 +43,7 @@ jobs:
|
||||
uses: ./.github/actions/prepare
|
||||
|
||||
- name: Install Oracle client
|
||||
if: matrix.vendor == 'oracle'
|
||||
run: |
|
||||
sudo apt update -y && sudo apt install -y alien libaio1 && \
|
||||
wget https://download.oracle.com/otn_software/linux/instantclient/214000/$ORACLE_DL && \
|
||||
@@ -40,7 +53,8 @@ jobs:
|
||||
ORACLE_DL: oracle-instantclient-basic-21.4.0.0.0-1.el8.x86_64.rpm
|
||||
|
||||
- name: Start Databases
|
||||
run: docker compose -f tests-blackbox/docker-compose.yml up -d --quiet-pull --wait
|
||||
if: matrix.vendor != 'sqlite3'
|
||||
run: docker compose -f tests-blackbox/docker-compose.yml up ${{ matrix.vendor }} -d --quiet-pull --wait
|
||||
|
||||
- name: Run Tests
|
||||
run: pnpm run -w test:blackbox
|
||||
run: TEST_DB=${{ matrix.vendor }} pnpm run -w test:blackbox
|
||||
|
||||
@@ -7,6 +7,7 @@ import { spawn, ChildProcess } from 'child_process';
|
||||
import { awaitDirectusConnection } from '@utils/await-connection';
|
||||
import { validateDateDifference } from '@utils/validate-date-difference';
|
||||
import * as common from '@common/index';
|
||||
import { sleep } from '@utils/sleep';
|
||||
|
||||
const collectionName = 'schema_timezone_tests';
|
||||
|
||||
@@ -237,6 +238,8 @@ describe('schema', () => {
|
||||
|
||||
describe('stores the correct timezone data when updated', () => {
|
||||
it.each(vendors)('%s', async (vendor) => {
|
||||
await sleep(1000);
|
||||
|
||||
const payload = {
|
||||
date: sampleDates[0]!.date,
|
||||
};
|
||||
|
||||
@@ -7,6 +7,7 @@ import { spawn, ChildProcess } from 'child_process';
|
||||
import { awaitDirectusConnection } from '@utils/await-connection';
|
||||
import { validateDateDifference } from '@utils/validate-date-difference';
|
||||
import * as common from '@common/index';
|
||||
import { sleep } from '@utils/sleep';
|
||||
|
||||
const collectionName = 'schema_timezone_tests';
|
||||
|
||||
@@ -294,6 +295,8 @@ describe('schema', () => {
|
||||
|
||||
describe('stores the correct timezone data when updated', () => {
|
||||
it.each(vendors)('%s', async (vendor) => {
|
||||
await sleep(1000);
|
||||
|
||||
const payload = {
|
||||
date: sampleDates[0]!.date,
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@ import { cloneDeep } from 'lodash';
|
||||
import { validateDateDifference } from '@utils/validate-date-difference';
|
||||
import { CreateCollection, CreateField, DeleteCollection } from '@common/functions';
|
||||
import * as common from '@common/index';
|
||||
import { sleep } from '@utils/sleep';
|
||||
|
||||
const collectionName = 'schema_timezone_tests';
|
||||
|
||||
@@ -255,6 +256,8 @@ describe('schema', () => {
|
||||
|
||||
describe('stores the correct timezone data when updated', () => {
|
||||
it.each(vendors)('%s', async (vendor) => {
|
||||
await sleep(1000);
|
||||
|
||||
const payload = {
|
||||
date: sampleDates[0]!.date,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user