Chore/GitHub setting #4
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 | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
- name: Add pnpm store path to env var | |
id: pnpm-cache | |
shell: bash | |
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
js-lint: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
- name: Add pnpm store path to env var | |
id: pnpm-cache | |
shell: bash | |
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Restore cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: JS linting | |
run: pnpm run lint:js | |
md-lint: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
# - 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: pnpm run lint:md | |
format: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
# - 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: pnpm run format:js | |
spell-check: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
# - 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: pnpm run spellcheck:lint | |
build: | |
needs: install_modules | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
run_install: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
cache: "pnpm" | |
# - 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: pnpm run build |