Files
directus/.github/workflows/blackbox-main.yml
ian 7899f6a267 Remove dev dependencies when running blackbox tests (#16271)
* Remove dev dependencies when running blackbox tests

* Install dev dependencies in workspace root to run tests

* Shift dependency to see if tests fail

* Revert dependency shifting test

* Remove specifying of shell
2022-11-03 09:15:48 -04:00

75 lines
1.9 KiB
YAML

name: Blackbox Tests
on:
push:
branches:
- main
paths:
- api/**
- tests-blackbox/**
- packages/shared/**
- package.json
- pnpm-lock.yaml
- .github/workflows/blackbox-main.yml
concurrency:
group: blackbox-main
cancel-in-progress: true
env:
NODE_OPTIONS: --max_old_space_size=6144
jobs:
test:
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
- name: Prepare
uses: ./.github/actions/prepare
- name: Prune Dependencies
run: find . -type d -name node_modules -prune -exec rm -rf {} \;
- name: Install Production Dependencies
run: pnpm install --prod
- name: Install Root Dev Dependencies
run: pnpm install -w --dev
- 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 && \
sudo alien -i $ORACLE_DL && \
pnpm -w -D add oracledb
env:
ORACLE_DL: oracle-instantclient-basic-21.4.0.0.0-1.el8.x86_64.rpm
- name: Start Services (SQLite)
if: matrix.vendor == 'sqlite3'
run: docker compose -f tests-blackbox/docker-compose.yml up auth-saml -d --quiet-pull --wait
- name: Start Services (Other vendors)
if: matrix.vendor != 'sqlite3'
run:
docker compose -f tests-blackbox/docker-compose.yml up ${{ matrix.vendor }} auth-saml -d --quiet-pull --wait
- name: Run Tests
run: TEST_DB=${{ matrix.vendor }} pnpm run -w test:blackbox