Chore/GitHub setting #2
Workflow file for this run
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: PR Checks | |
on: [pull_request] | |
jobs: | |
install_modules: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
**/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
js-lint: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
**/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: JS linting | |
run: npm run lint:js | |
md-lint: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
**/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: MDX linting | |
run: npm run lint:md | |
format: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
**/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Run formatting | |
run: npm run format:js | |
spell-check: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
**/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Run Spellcheck | |
run: npm run spellcheck:lint | |
build: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "npm" | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
**/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Building app | |
run: npm run build |