Skip to content

Commit

Permalink
update actions/checkout@v3, actions/setup-node@v3, node-version: 16 (#…
Browse files Browse the repository at this point in the history
…258)

* update actions/checkout@v3, actions/setup-node@v3, node-version: 16

* use yarn everywhere
  • Loading branch information
modosc authored Aug 24, 2022
1 parent f58c52e commit 744e32c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
ref: ${{ github.head_ref }}
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn
- run: npm run test
- run: npm run lint
node-version: 16
cache: 'yarn'
- run: yarn install
- run: yarn test
- run: yarn lint
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
"url": "git+https://github.com/modosc/global-jsdom.git"
},
"scripts": {
"test": "npm run test:jsdom && npm run test:examples",
"test:jsdom": "npm run test:jsdom:esm && npm run test:jsdom:commonjs",
"test:jsdom:esm": "mocha --require test/setup.mjs test/*.test.mjs",
"test:jsdom:commonjs": "mocha --require test/setup.js test/*.test.js",
"test": "yarn test:jsdom && yarn test:examples",
"test:jsdom": "yarn test:jsdom:esm && yarn test:jsdom:commonjs",
"test:jsdom:esm": "yarn mocha --require test/setup.mjs test/*.test.mjs",
"test:jsdom:commonjs": "yarn mocha --require test/setup.js test/*.test.js",
"test:examples": "cd examples && yarn install && yarn upgrade global-jsdom && yarn test; cd ..",
"lint": "eslint --ext=js,mjs --cache .eslintrc.js examples/ commonjs/ esm/ test/ ",
"lint:fix": "eslint --ext=js,mjs --cache --fix .eslintrc.js examples/ commonjs/ esm/ test/"
"lint": "yarn eslint --ext=js,mjs --cache .eslintrc.js examples/ commonjs/ esm/ test/ ",
"lint:fix": "yarn eslint --ext=js,mjs --cache --fix .eslintrc.js examples/ commonjs/ esm/ test/"
}
}

0 comments on commit 744e32c

Please sign in to comment.