Skip to content

feat Set up mysql and postgres test environment for cli closes #15 #26

feat Set up mysql and postgres test environment for cli closes #15

feat Set up mysql and postgres test environment for cli closes #15 #26

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm i -g --force corepack@latest && corepack enable
- name: Install dependencies
run: npx nypm@latest i
- name: Lint
run: npm run lint
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: 123
MYSQL_DATABASE: test_db
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: 123
POSTGRES_DB: test_db
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm i -g --force corepack@latest && corepack enable
- name: Install dependencies
run: npx nypm@latest i
- name: Playground prepare
run: npm run dev:prepare
- name: Test
run: npm run test
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm run autofix
- uses: autofix-ci/action@8bc06253bec489732e5f9c52884c7cace15c0160