From 4fe6443c9513ff26afd6e1b16a438930129edee3 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Sun, 16 Jun 2024 20:38:20 +0800 Subject: [PATCH] ci: change node-version (#213) --- .github/workflows/docsify-cli.yml | 7 ++++--- e2e/commands/generate.test.js | 4 ++-- e2e/commands/init.test.js | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docsify-cli.yml b/.github/workflows/docsify-cli.yml index 25afeb9..d0f83cf 100644 --- a/.github/workflows/docsify-cli.yml +++ b/.github/workflows/docsify-cli.yml @@ -13,12 +13,13 @@ jobs: strategy: matrix: os: [ macos-latest, ubuntu-latest, windows-latest ] - node-version: [ 14.x, 16.x, lts/* ] + node-version: [ 'lts/*' ] + fail-fast: false 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 }} 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 => {