Skip to content

chore(deps): update dependency jest to v29 - autoclosed #126

chore(deps): update dependency jest to v29 - autoclosed

chore(deps): update dependency jest to v29 - autoclosed #126

Workflow file for this run

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 }}