Skip to content

Updating runner to use database versions and CI comparable to v7 #377

Updating runner to use database versions and CI comparable to v7

Updating runner to use database versions and CI comparable to v7 #377

Workflow file for this run

name: CI
on:
pull_request:
# This configuration cancels previous runs if a new run is started on the same PR. Only one run at a time per PR.
# from https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
install-and-build:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
name: Upload install and build artifact (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Install dependencies
run: yarn install
- name: Compress artifact
run: tar -cf install-build-node-${{ matrix.node-version }}.tar ./packages/core/lib ./packages/core/types ./packages/validator-js/lib ./packages/validator-js/types ./node_modules
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: install-build-artifact-node-${{ matrix.node-version }}
path: install-build-node-${{ matrix.node-version }}.tar
retention-days: 1
test-sqlite:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
name: sqlite (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
needs: [ install-and-build ]
env:
DIALECT: sqlite
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
name: install-build-artifact-node-${{ matrix.node-version }}
- name: Extract artifact
run: tar -xf install-build-node-${{ matrix.node-version }}.tar
- run: /bin/bash ./setup/prepare-ci.sh
- name: Execute SSCCE
run: yarn run _test
test-postgres:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
postgres-version: [oldest, latest]
minify-aliases: [true, false]
native: [true, false]
name: postgres ${{ matrix.postgres-version }}${{ matrix.native && ' (native)' || '' }} (Node ${{ matrix.node-version }})${{ matrix.minify-aliases && ' (minified aliases)' || '' }}
runs-on: ubuntu-latest
needs: [ install-and-build ]
env:
DIALECT: ${{ matrix.native && 'postgres-native' || 'postgres' }}
SEQ_PG_MINIFY_ALIASES: ${{ matrix.minify-aliases && '1' || '' }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
name: install-build-artifact-node-${{ matrix.node-version }}
- name: Extract artifact
run: tar -xf install-build-node-${{ matrix.node-version }}.tar
- run: yarn start-postgres-${{ matrix.postgres-version }}
- run: /bin/bash ./setup/prepare-ci.sh
- name: Execute SSCCE
run: yarn run _test
test-oldest-latest:
strategy:
fail-fast: false
matrix:
node-version: [10, 18, 20]
database-version: [oldest, latest]
dialect: [mysql, mariadb, mssql, db2]
name: ${{ matrix.dialect }} ${{ matrix.database-version }} (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
needs: [ install-and-build ]
env:
DIALECT: ${{ matrix.dialect }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- uses: actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
with:
name: install-build-artifact-node-${{ matrix.node-version }}
- name: Extract artifact
run: tar -xf install-build-node-${{ matrix.node-version }}.tar
- run: yarn start-${{ matrix.dialect }}-${{ matrix.database-version }}
- run: /bin/bash ./setup/prepare-ci.sh
- name: Execute SSCCE
run: yarn run _test