Files
directus/.github/workflows/e2e-tests.yml
Oreille 9dda9caddb Enable end-to-end tests for Oracle and SQLite (#11094)
* 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>
2022-01-19 13:00:44 -05:00

60 lines
1.4 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: 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: Install oracle client
run: |
sudo apt update -y && sudo apt install -y alien libaio1 && \
wget https://download.oracle.com/otn_software/linux/instantclient/214000/$ORACLE_DL && \
sudo alien -i $ORACLE_DL
env:
ORACLE_DL: oracle-instantclient-basic-21.4.0.0.0-1.el8.x86_64.rpm
- name: Start databases
run: docker compose -f tests/docker-compose.yml up -d --quiet-pull --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