Skip to content

Commit

Permalink
enable mysql win
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Feb 18, 2024
1 parent ef94c77 commit 2014f70
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@ jobs:
uses: NicTool/.github/.github/workflows/coverage.yml@main
secrets: inherit

get-lts:
runs-on: ubuntu-latest
steps:
- id: get
uses: msimerson/node-lts-versions@v1
outputs:
lts: ${{ steps.get.outputs.lts }}
active: ${{ steps.get.outputs.active }}

test:
needs: [ lint, get-lts ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, macos-latest]
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
fail-fast: false
steps:
Expand All @@ -37,11 +46,23 @@ jobs:
- run: npm install
- run: npm test

get-lts:
runs-on: ubuntu-latest
test-win:
needs: [ lint, get-lts ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
fail-fast: false
steps:
- id: get
uses: msimerson/node-lts-versions@v1
outputs:
lts: ${{ steps.get.outputs.lts }}
active: ${{ steps.get.outputs.active }}
- name: Start MySQL
run: /etc/init.d/mysql start
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
with:
node-version: ${{ matrix.node-version }}
- name: Initialize MySQL
run: sh sql/init-mysql.sh
- run: npm install
- run: npm test
2 changes: 0 additions & 2 deletions sql/01_nt_group.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ CREATE TABLE nt_group_log(
PRIMARY KEY (`nt_group_log_id`),
KEY `nt_group_log_idx1` (`nt_group_id`),
KEY `nt_group_log_idx2` (`timestamp`)
/* CONSTRAINT `nt_group_log_ibfk_1` FOREIGN KEY (`nt_group_id`) REFERENCES `nt_group` (`nt_group_id`) ON DELETE CASCADE ON UPDATE CASCADE */
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED;


Expand All @@ -39,7 +38,6 @@ CREATE TABLE nt_group_subgroups(
rank INT UNSIGNED NOT NULL,
KEY `nt_group_subgroups_idx1` (`nt_group_id`),
KEY `nt_group_subgroups_idx2` (`nt_subgroup_id`)
/* CONSTRAINT `nt_group_subgroups_ibfk_1` FOREIGN KEY (`nt_group_id`) REFERENCES `nt_group` (`nt_group_id`) ON DELETE CASCADE ON UPDATE CASCADE */
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

INSERT INTO `nt_group` (`nt_group_id`, `parent_group_id`, `name`)
Expand Down

0 comments on commit 2014f70

Please sign in to comment.