Skip to content

fix build

fix build #2

Workflow file for this run

name: Node.js CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 28, Col: 9): Unexpected value 'command'
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.4
env:
MYSQL_ROOT_PASSWORD: rootpw
MYSQL_DATABASE: test_db
MYSQL_USER: user
MYSQL_PASSWORD: passw0rd
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
command: --default-authentication-plugin=mysql_native_password
postgres:
image: postgres:11.1
env:
POSTGRES_USER: postgres
POSTGRES_DB: test_db
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@v3
- name: Use Node.js 22
uses: actions/setup-node@v3
with:
node-version: 22
cache: 'npm'
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
env:
MYSQL_URL: mysql://user:passw0rd@127.0.0.1/test_db
POSTGRES_URL: postgres://postgres@127.0.0.1/test_db