chore(deps): update dependency jest to v29 #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
YARN_NODE_LINKER: pnp # use pnp linker for better linking performance | |
YARN_ENABLE_SCRIPTS: false # disable post-install scripts | |
jobs: | |
prepare-yarn-cache: | |
name: Prepare Cache | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js latest | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "*" | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- uses: actions/cache@v3 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: yarn-${{ hashFiles('yarn.lock') }} | |
restore-keys: | | |
yarn- | |
- name: Check Yarn dedupe | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: | | |
yarn dedupe --check | |
- name: Check or update Yarn cache | |
run: | | |
yarn install --immutable --mode=skip-build | |
test: | |
name: Test on Node.js # GitHub will add ${{ matrix.node-version }} to this title | |
needs: prepare-yarn-cache | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: ["*", 14, 12] | |
os: ["ubuntu-latest", "windows-latest"] | |
hexo-version: [6] | |
include: | |
# Legacy hexo versions | |
- node-version: 12 | |
os: ubuntu-latest | |
hexo-version: 5 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Use Node.js latest # Run yarn on latest node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "*" # Build Babel on latest node LTS versions | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: yarn-${{ hashFiles('yarn.lock') }} | |
- name: Install | |
run: | | |
yarn install | |
yarn add --dev hexo@${{ matrix.hexo-version }} | |
- name: Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Test | |
run: | | |
yarn test --coverage | |
yarn spellcheck | |
- name: Coveralls GitHub Action | |
if: matrix.node-version == '*' | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.github_token }} |