Skip to content

ci: fix env vars

ci: fix env vars #538

Workflow file for this run

name: test
on:
- push
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install
- run: npm run lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install
- run: npx tsc
test-postgres:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
postgres-version: [11, 14]
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
PG_HOST: localhost
PG_PASSWORD: secret
PG_DATABASE: lucid
PG_PORT: 5432
PG_USER: virk
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm install
- name: Run Postgres Tests
run: npm run test:pg
test-mysql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mysql: [{ version: '5.7', command: 'mysql_legacy' }, { version: '8.0', command: 'mysql' }]
node-version: [18, 20]
services:
mysql:
image: mysql:${{ matrix.mysql.version }}
env:
MYSQL_HOST: localhost
MYSQL_PASSWORD: secret
MYSQL_DATABASE: lucid
MYSQL_PORT: 3306
MYSQL_USER: virk
MYSQL_ROOT_PASSWORD: password
LEGACY_MYSQL_HOST: localhost
LEGACY_MYSQL_PASSWORD: secret
LEGACY_MYSQL_DATABASE: lucid
LEGACY_MYSQL_PORT: 3306
LEGACY_MYSQL_USER: virk
MYSQL_ROOT_PASSWORD: password

Check failure on line 77 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 77, Col: 11): 'MYSQL_ROOT_PASSWORD' is already defined
ports:
- '3306:3306'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm install
- name: Run Mysql Tests
run: npm run test:${{ matrix.mysql.command }}
test-sqlite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
lib: ['sqlite', 'better_sqlite']
node-version: [18, 20]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm install
- name: Run Sqlite Tests
run: npm run test:${{ matrix.lib }}
test-mssql:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
SA_PASSWORD: 'arandom&233password'
ACCEPT_EULA: 'Y'
ports:
- '1433:1433'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm install
- name: Run Mssql Tests
run: npm run test:mssql