Unify builds and add matrix build with LTS versions. #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |