jan 15 event link #418
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: Check | |
# responsible for checking the the code is in good | |
# working order, before merging (or while its in main) | |
on: | |
push: | |
paths-ignore: | |
- 'design/**' | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch Name' | |
required: true | |
type: string | |
workflow_call: | |
inputs: | |
branch: | |
description: 'Branch Name' | |
required: true | |
type: string | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref || github.event.inputs.branch || 'main' }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' # Set this to the node version you are using | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
shell: bash | |
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | |
- uses: actions/cache@v3 | |
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- run: npm i | |
- name: Run style check | |
run: npm run style | |
- name: Run lintpkg | |
run: npm run lintpkg | |
- name: Run Build | |
run: npm run build |