Z-J-wang running lint action by push #10
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: Lint | |
run-name: ${{ github.actor }} running lint action by ${{ github.event_name }} | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Cache node modules | |
id: cache-yarn | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-lint-${{ env.cache-name }}- | |
${{ runner.os }}-lint- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: yarn list | |
- name: Install | |
run: yarn | |
- name: Lint | |
run: yarn lint |