chore(deps): update actions/cache action to v4 #634
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: develop | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
check: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2.4.0 | |
- id: node_version | |
run: echo "##[set-output name=node;]$(cat ./.node-version)" | |
- name: Setup Node.js | |
uses: actions/setup-node@v2.5.1 | |
with: | |
node-version: "${{ steps.node_version.outputs.node }}" | |
- name: cache node_modules | |
uses: actions/cache@v4.0.0 | |
with: | |
id: node_modules | |
path: node_modules | |
key: app-yarn-${{ hashFiles('**\yarn.lock') }} | |
restore-keys: app-yarn-${{ hashFiles('**\yarn.lock') }} | |
- run: yarn | |
if: steps.node_modules.outputs.cache-hit != 'true' | |
- run: yarn lint | |
- run: yarn test | |
- run: npx codecov --token=$CODECOV_TOKEN | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |