Skip to content

Unify builds and add matrix build with LTS versions. #17

Unify builds and add matrix build with LTS versions.

Unify builds and add matrix build with LTS versions. #17

name: javascript-buld
on:
push:
paths:
- 'javascript/**'
- '.github/workflows/javascript-build.yml'
pull_request:
paths:
- 'typescript/**'
- '.github/workflows/javascript-build.yml'
jobs:
build:
defaults:
run:
working-directory: ./javascript
runs-on: ubuntu-latest
env:
DB_USER: root
DB_OLD_PASSWORD: root
DB_PASSWORD: mysql
strategy:
matrix:
node-version: [10, 12, 14, 16, 18]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Start MYSQL and import DB
run: |
sudo systemctl start mysql
mysqladmin --user=${{ env.DB_USER }} --password=${{ env.DB_OLD_PASSWORD }} password ${{ env.DB_PASSWORD }}
mysql -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} < ${GITHUB_WORKSPACE}/database/initDatabase.sql
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up dependencies
run: npm install --force