Skip to content

Commit

Permalink
[CI] Ensure check-text GHA jobs use proper node version
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Apr 2, 2024
1 parent 405d7cd commit c80e6f3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/check-text.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Make sure that we only install the dependencies for textlint to speed up install
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- run: |
mkdir -p tmp
jq '.devDependencies |= with_entries( select(.key | startswith("textlint")))
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-min.json
cp tmp/package-min.json package.json
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: tmp/package-ci.json
- run: npm install --ignore-scripts --omit=optional
- run: .github/workflows/scripts/textlint.sh

Expand All @@ -24,7 +32,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create and use reduced-dependencies package.json
run: |
mkdir -p tmp
Expand All @@ -34,5 +41,10 @@ jobs:
| del(.dependencies, .optionalDependencies)' \
package.json > tmp/package-min.json
cp tmp/package-min.json package.json
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: tmp/package-ci.json
- run: npm install --ignore-scripts --omit=optional
- run: npm run check:markdown

0 comments on commit c80e6f3

Please sign in to comment.