From ffd93cef87765cd54dc01c43de6cd64c291e983a Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Sun, 16 Jun 2024 19:42:03 +0800 Subject: [PATCH 1/4] ci: change node-version --- .github/workflows/docsify-cli.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docsify-cli.yml b/.github/workflows/docsify-cli.yml index 25afeb9..989283d 100644 --- a/.github/workflows/docsify-cli.yml +++ b/.github/workflows/docsify-cli.yml @@ -13,12 +13,12 @@ jobs: strategy: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - node-version: [ 14.x, 16.x, lts/* ] + node-version: [ 18, 20, latest, lts ] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} From 0053773e44089bb3b9bae1d4a6e2d2c6605eef3b Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Sun, 16 Jun 2024 19:43:46 +0800 Subject: [PATCH 2/4] ci: change node-version --- .github/workflows/docsify-cli.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docsify-cli.yml b/.github/workflows/docsify-cli.yml index 989283d..c16bf96 100644 --- a/.github/workflows/docsify-cli.yml +++ b/.github/workflows/docsify-cli.yml @@ -13,7 +13,8 @@ jobs: strategy: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - node-version: [ 18, 20, latest, lts ] + node-version: [ 18, 20, latest, 'lts/*' ] + fail-fast: false steps: - uses: actions/checkout@v4 From fcd6ca0f9842899bc626cfb1b79b98f53dfaa46d Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Sun, 16 Jun 2024 20:06:39 +0800 Subject: [PATCH 3/4] ci: fix test error --- .github/workflows/docsify-cli.yml | 2 +- e2e/commands/generate.test.js | 4 ++-- e2e/commands/init.test.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docsify-cli.yml b/.github/workflows/docsify-cli.yml index c16bf96..509dbc4 100644 --- a/.github/workflows/docsify-cli.yml +++ b/.github/workflows/docsify-cli.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - node-version: [ 18, 20, latest, 'lts/*' ] + node-version: [ 18, 20, 'lts/*', latest ] fail-fast: false steps: diff --git a/e2e/commands/generate.test.js b/e2e/commands/generate.test.js index cb60bef..71513d3 100644 --- a/e2e/commands/generate.test.js +++ b/e2e/commands/generate.test.js @@ -10,14 +10,14 @@ const docsPath = path.join(genPath, 'docs') test.before('create temp directory', () => { // Cleanup if the directory already exists if (fs.existsSync(genPath)) { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) } fs.mkdirSync(genPath) }) test.after('cleanup', () => { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) }) test('generate _sidebar.md', t => { diff --git a/e2e/commands/init.test.js b/e2e/commands/init.test.js index 035adf7..5e40967 100644 --- a/e2e/commands/init.test.js +++ b/e2e/commands/init.test.js @@ -11,14 +11,14 @@ const docsPath = path.join(genPath, 'docs') test.before('create temp directory', () => { // Cleanup if the directory already exists if (fs.existsSync(genPath)) { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) } fs.mkdirSync(genPath) }) test.after('cleanup', () => { - fs.rmdirSync(genPath, {recursive: true}) + fs.rmSync(genPath, {recursive: true}) }) test('generates docs directory', t => { From f18345b404ac8a3b0ded5453fd47f7fba246a022 Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Sun, 16 Jun 2024 20:36:48 +0800 Subject: [PATCH 4/4] ci: fix test error --- .github/workflows/docsify-cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docsify-cli.yml b/.github/workflows/docsify-cli.yml index 509dbc4..d0f83cf 100644 --- a/.github/workflows/docsify-cli.yml +++ b/.github/workflows/docsify-cli.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - node-version: [ 18, 20, 'lts/*', latest ] + node-version: [ 'lts/*' ] fail-fast: false steps: