Put back entire workflow

This commit is contained in:
Alexandre Bodin 2022-03-25 09:16:17 +01:00
parent 4b965665d4
commit 5920e31b5b
2 changed files with 260 additions and 278 deletions

View File

@ -7,171 +7,171 @@ on:
pull_request: pull_request:
jobs: jobs:
# lint: lint:
# name: 'lint (node: ${{ matrix.node }})' name: 'lint (node: ${{ matrix.node }})'
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# strategy: strategy:
# matrix: matrix:
# node: [12, 14, 16] node: [12, 14, 16]
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: actions/setup-node@v2-beta - uses: actions/setup-node@v2-beta
# with: with:
# node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# - uses: ./.github/actions/install-modules - uses: ./.github/actions/install-modules
# - name: Run lint - name: Run lint
# run: yarn run -s lint run: yarn run -s lint
# unit_back: unit_back:
# name: 'unit_back (node: ${{ matrix.node }})' name: 'unit_back (node: ${{ matrix.node }})'
# needs: [lint] needs: [lint]
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# env: env:
# CODECOV_TOKEN: ${{ secrets.codecov }} CODECOV_TOKEN: ${{ secrets.codecov }}
# strategy: strategy:
# matrix: matrix:
# node: [12, 14, 16] node: [12, 14, 16]
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: actions/setup-node@v2-beta - uses: actions/setup-node@v2-beta
# with: with:
# node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# - uses: ./.github/actions/install-modules - uses: ./.github/actions/install-modules
# with: with:
# globalPackages: codecov globalPackages: codecov
# - name: Run tests - name: Run tests
# run: yarn run -s test:unit --coverage && codecov -C -F unit run: yarn run -s test:unit --coverage && codecov -C -F unit
# unit_front: unit_front:
# name: 'unit_front (node: ${{ matrix.node }})' name: 'unit_front (node: ${{ matrix.node }})'
# needs: [lint] needs: [lint]
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# env: env:
# CODECOV_TOKEN: ${{ secrets.codecov }} CODECOV_TOKEN: ${{ secrets.codecov }}
# strategy: strategy:
# matrix: matrix:
# node: [12, 14, 16] node: [12, 14, 16]
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: actions/setup-node@v2-beta - uses: actions/setup-node@v2-beta
# with: with:
# node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# - uses: ./.github/actions/install-modules - uses: ./.github/actions/install-modules
# with: with:
# globalPackages: codecov globalPackages: codecov
# - name: Build - name: Build
# run: yarn build run: yarn build
# - name: Run test - name: Run test
# run: yarn run -s test:front && codecov -C -F front run: yarn run -s test:front && codecov -C -F front
# e2e_ce_pg: e2e_ce_pg:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: [lint, unit_back, unit_front] needs: [lint, unit_back, unit_front]
# name: '[CE] E2E (postgres, node: ${{ matrix.node }})' name: '[CE] E2E (postgres, node: ${{ matrix.node }})'
# strategy: strategy:
# matrix: matrix:
# node: [12, 14, 16] node: [12, 14, 16]
# services: services:
# postgres: postgres:
# # Docker Hub image # Docker Hub image
# image: postgres image: postgres
# # Provide the password for postgres # Provide the password for postgres
# env: env:
# POSTGRES_USER: strapi POSTGRES_USER: strapi
# POSTGRES_PASSWORD: strapi POSTGRES_PASSWORD: strapi
# POSTGRES_DB: strapi_test POSTGRES_DB: strapi_test
# # Set health checks to wait until postgres has started # Set health checks to wait until postgres has started
# options: >- options: >-
# --health-cmd pg_isready --health-cmd pg_isready
# --health-interval 10s --health-interval 10s
# --health-timeout 5s --health-timeout 5s
# --health-retries 5 --health-retries 5
# ports: ports:
# # Maps tcp port 5432 on service container to the host # Maps tcp port 5432 on service container to the host
# - 5432:5432 - 5432:5432
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: actions/setup-node@v2-beta - uses: actions/setup-node@v2-beta
# with: with:
# node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# - uses: ./.github/actions/install-modules - uses: ./.github/actions/install-modules
# - uses: ./.github/actions/run-e2e-tests - uses: ./.github/actions/run-e2e-tests
# with: with:
# dbOptions: '--dbclient=postgres --dbhost=localhost --dbport=5432 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi' dbOptions: '--dbclient=postgres --dbhost=localhost --dbport=5432 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
# e2e_ce_mysql: e2e_ce_mysql:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: [lint, unit_back, unit_front] needs: [lint, unit_back, unit_front]
# name: '[CE] E2E (mysql, node: ${{ matrix.node }})' name: '[CE] E2E (mysql, node: ${{ matrix.node }})'
# strategy: strategy:
# matrix: matrix:
# node: [12, 14, 16] node: [12, 14, 16]
# services: services:
# mysql: mysql:
# image: mysql image: mysql
# options: >- options: >-
# --health-cmd="mysqladmin ping" --health-cmd="mysqladmin ping"
# --health-interval=10s --health-interval=10s
# --health-timeout=5s --health-timeout=5s
# --health-retries=3 --health-retries=3
# -e MYSQL_ROOT_PASSWORD=strapi -e MYSQL_ROOT_PASSWORD=strapi
# -e MYSQL_ROOT_HOST="%" -e MYSQL_ROOT_HOST="%"
# -e MYSQL_USER=strapi -e MYSQL_USER=strapi
# -e MYSQL_PASSWORD=strapi -e MYSQL_PASSWORD=strapi
# -e MYSQL_DATABASE=strapi_test -e MYSQL_DATABASE=strapi_test
# --entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" --entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
# ports: ports:
# # Maps tcp port 5432 on service container to the host # Maps tcp port 5432 on service container to the host
# - 3306:3306 - 3306:3306
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: actions/setup-node@v2 - uses: actions/setup-node@v2
# with: with:
# node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# cache: yarn cache: yarn
# - uses: ./.github/actions/install-modules - uses: ./.github/actions/install-modules
# - uses: ./.github/actions/run-e2e-tests - uses: ./.github/actions/run-e2e-tests
# with: with:
# dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi' dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
# e2e_ce_mysql_5: e2e_ce_mysql_5:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: [lint, unit_back, unit_front] needs: [lint, unit_back, unit_front]
# name: '[CE] E2E (mysql:5 , node: ${{ matrix.node }})' name: '[CE] E2E (mysql:5 , node: ${{ matrix.node }})'
# strategy: strategy:
# matrix: matrix:
# node: [12, 14, 16] node: [12, 14, 16]
# services: services:
# mysql: mysql:
# image: mysql:5 image: mysql:5
# options: >- options: >-
# --health-cmd="mysqladmin ping" --health-cmd="mysqladmin ping"
# --health-interval=10s --health-interval=10s
# --health-timeout=5s --health-timeout=5s
# --health-retries=3 --health-retries=3
# -e MYSQL_ROOT_PASSWORD=strapi -e MYSQL_ROOT_PASSWORD=strapi
# -e MYSQL_ROOT_HOST="%" -e MYSQL_ROOT_HOST="%"
# -e MYSQL_USER=strapi -e MYSQL_USER=strapi
# -e MYSQL_PASSWORD=strapi -e MYSQL_PASSWORD=strapi
# -e MYSQL_DATABASE=strapi_test -e MYSQL_DATABASE=strapi_test
# --entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" --entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
# ports: ports:
# # Maps tcp port 5432 on service container to the host # Maps tcp port 5432 on service container to the host
# - 3306:3306 - 3306:3306
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: actions/setup-node@v2 - uses: actions/setup-node@v2
# with: with:
# node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# cache: yarn cache: yarn
# - uses: ./.github/actions/install-modules - uses: ./.github/actions/install-modules
# - uses: ./.github/actions/run-e2e-tests - uses: ./.github/actions/run-e2e-tests
# with: with:
# dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi' dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
e2e_ce_sqlite: e2e_ce_sqlite:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: [lint, unit_back, unit_front] needs: [lint, unit_back, unit_front]
name: '[CE] E2E (sqlite: ${{ matrix.sqlite_pkg }}, node: ${{ matrix.node }})' name: '[CE] E2E (sqlite: ${{ matrix.sqlite_pkg }}, node: ${{ matrix.node }})'
strategy: strategy:
matrix: matrix:
@ -190,122 +190,106 @@ jobs:
with: with:
dbOptions: '--dbclient=sqlite-legacy --dbfile=./tmp/data.db' dbOptions: '--dbclient=sqlite-legacy --dbfile=./tmp/data.db'
# EE # EE
# e2e_ee_pg: e2e_ee_pg:
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# needs: [lint, unit_back, unit_front] needs: [lint, unit_back, unit_front]
# name: '[EE] E2E (postgres, node: ${{ matrix.node }})' name: '[EE] E2E (postgres, node: ${{ matrix.node }})'
# if: github.event.pull_request.head.repo.full_name == github.repository && !(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') if: github.event.pull_request.head.repo.full_name == github.repository && !(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
# env: env:
# STRAPI_LICENSE: ${{ secrets.strapiLicense }} STRAPI_LICENSE: ${{ secrets.strapiLicense }}
# strategy: strategy:
# matrix: matrix:
# node: [12, 14, 16] node: [12, 14, 16]
# services: services:
# postgres: postgres:
# # Docker Hub image # Docker Hub image
# image: postgres image: postgres
# # Provide the password for postgres # Provide the password for postgres
# env: env:
# POSTGRES_USER: strapi POSTGRES_USER: strapi
# POSTGRES_PASSWORD: strapi POSTGRES_PASSWORD: strapi
# POSTGRES_DB: strapi_test POSTGRES_DB: strapi_test
# # Set health checks to wait until postgres has started # Set health checks to wait until postgres has started
# options: >- options: >-
# --health-cmd pg_isready --health-cmd pg_isready
# --health-interval 10s --health-interval 10s
# --health-timeout 5s --health-timeout 5s
# --health-retries 5 --health-retries 5
# ports: ports:
# # Maps tcp port 5432 on service container to the host # Maps tcp port 5432 on service container to the host
# - 5432:5432 - 5432:5432
# steps: steps:
# - uses: actions/checkout@v2 - uses: actions/checkout@v2
# - uses: actions/setup-node@v2 - uses: actions/setup-node@v2
# with: with:
# node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
# cache: yarn cache: yarn
# - uses: ./.github/actions/install-modules - uses: ./.github/actions/install-modules
# - uses: ./.github/actions/run-e2e-tests - uses: ./.github/actions/run-e2e-tests
# with: with:
# dbOptions: '--dbclient=postgres --dbhost=localhost --dbport=5432 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi' dbOptions: '--dbclient=postgres --dbhost=localhost --dbport=5432 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
# runEE: true runEE: true
# e2e_ee_mysql:
# runs-on: ubuntu-latest e2e_ee_mysql:
# needs: [lint, unit_back, unit_front] runs-on: ubuntu-latest
# name: '[EE] E2E (mysql, node: ${{ matrix.node }})' needs: [lint, unit_back, unit_front]
# if: github.event.pull_request.head.repo.full_name == github.repository && !(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') name: '[EE] E2E (mysql, node: ${{ matrix.node }})'
# env: if: github.event.pull_request.head.repo.full_name == github.repository && !(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
# STRAPI_LICENSE: ${{ secrets.strapiLicense }} env:
# strategy: STRAPI_LICENSE: ${{ secrets.strapiLicense }}
# matrix: strategy:
# node: [12, 14, 16] matrix:
# services: node: [12, 14, 16]
# mysql: services:
# image: mysql mysql:
# options: >- image: mysql
# --health-cmd="mysqladmin ping" options: >-
# --health-interval=10s --health-cmd="mysqladmin ping"
# --health-timeout=5s --health-interval=10s
# --health-retries=3 --health-timeout=5s
# -e MYSQL_ROOT_PASSWORD=strapi --health-retries=3
# -e MYSQL_ROOT_HOST="%" -e MYSQL_ROOT_PASSWORD=strapi
# -e MYSQL_USER=strapi -e MYSQL_ROOT_HOST="%"
# -e MYSQL_PASSWORD=strapi -e MYSQL_USER=strapi
# -e MYSQL_DATABASE=strapi_test -e MYSQL_PASSWORD=strapi
# --entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" -e MYSQL_DATABASE=strapi_test
# ports: --entrypoint sh mysql -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
# # Maps tcp port 5432 on service container to the host ports:
# - 3306:3306 # Maps tcp port 5432 on service container to the host
# steps: - 3306:3306
# - uses: actions/checkout@v2 steps:
# - uses: actions/setup-node@v2 - uses: actions/checkout@v2
# with: - uses: actions/setup-node@v2
# node-version: ${{ matrix.node }} with:
# cache: yarn node-version: ${{ matrix.node }}
# - uses: ./.github/actions/install-modules cache: yarn
# - uses: ./.github/actions/run-e2e-tests - uses: ./.github/actions/install-modules
# with: - uses: ./.github/actions/run-e2e-tests
# dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi' with:
# runEE: true dbOptions: '--dbclient=mysql --dbhost=localhost --dbport=3306 --dbname=strapi_test --dbusername=strapi --dbpassword=strapi'
# e2e_ee_sqlite: runEE: true
# runs-on: ubuntu-latest
# needs: [lint, unit_back, unit_front] e2e_ee_sqlite:
# name: '[EE] E2E (sqlite, node: ${{ matrix.node }})' runs-on: ubuntu-latest
# if: github.event.pull_request.head.repo.full_name == github.repository && !(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') needs: [lint, unit_back, unit_front]
# env: name: '[EE] E2E (sqlite: ${{ matrix.sqlite_pkg }}, node: ${{ matrix.node }})'
# STRAPI_LICENSE: ${{ secrets.strapiLicense }} if: github.event.pull_request.head.repo.full_name == github.repository && !(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
# strategy: env:
# matrix: STRAPI_LICENSE: ${{ secrets.strapiLicense }}
# node: [12, 14, 16] strategy:
# steps: matrix:
# - uses: actions/checkout@v2 node: [12, 14, 16]
# - uses: actions/setup-node@v2 sqlite_pkg: ['better-sqlite3', 'sqlite3', '@vscode/sqlite3']
# with: steps:
# node-version: ${{ matrix.node }} - uses: actions/checkout@v2
# cache: yarn - uses: actions/setup-node@v2
# - uses: ./.github/actions/install-modules with:
# - uses: ./.github/actions/run-e2e-tests node-version: ${{ matrix.node }}
# with: cache: yarn
# dbOptions: '--dbclient=sqlite --dbfile=./tmp/data.db' - uses: ./.github/actions/install-modules
# runEE: true - uses: ./.github/actions/run-e2e-tests
# e2e_ee_sqlite_legacy: env:
# runs-on: ubuntu-latest SQLITE_PKG: ${{ matrix.sqlite_pkg }}
# needs: [lint, unit_back, unit_front] with:
# name: '[EE] E2E (sqlite legacy, node: ${{ matrix.node }})' dbOptions: '--dbclient=sqlite --dbfile=./tmp/data.db'
# if: github.event.pull_request.head.repo.full_name == github.repository && !(github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]') runEE: true
# env:
# STRAPI_LICENSE: ${{ secrets.strapiLicense }}
# strategy:
# matrix:
# node: [12, 14, 16]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: ${{ matrix.node }}
# cache: yarn
# - uses: ./.github/actions/install-modules
# - uses: ./.github/actions/run-e2e-tests
# with:
# dbOptions: '--dbclient=sqlite-legacy --dbfile=./tmp/data.db'
# runEE: true

View File

@ -49,8 +49,6 @@ const createConnection = config => {
if (knexConfig.client === 'sqlite') { if (knexConfig.client === 'sqlite') {
const sqlitePackageName = getSqlitePackageName(); const sqlitePackageName = getSqlitePackageName();
console.log(sqlitePackageName);
knexConfig.client = clientMap[sqlitePackageName]; knexConfig.client = clientMap[sqlitePackageName];
} }