Skip to content

1.12.5.11 (#80)

1.12.5.11 (#80) #83

Workflow file for this run

name: Lint and Test
on:
pull_request:
branches: ["**"]
push:
branches:
- "**"
env:
COREPACK_ENABLE_STRICT: 0
jobs:
# https://github.com/snezhig/obsidian-front-matter-title/blob/master/.github/workflows/main.yml
validate:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "true"
- name: Install Dependencies
run: npm install -g pnpm && pnpm install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- run: pnpm i
# - name: Eslint
# run: pnpm run lint
- name: Run test
run: pnpm run test
pretty:
needs: validate
runs-on: ubuntu-latest
# if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'Newdea/obsidian-spaced-repetition-recall'
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
- name: Prettify code
uses: creyD/prettier_action@v4.3
with:
prettier_version: ^3.1.1
# This part is also where you can pass other options, for example:
# prettier_options: --write *.ts *.json src test --ignore-path package-lock.json
# --config .prettierrc.json --ignore-path package-lock.json pnpm-lock.yaml
prettier_options: --write .
lint_and_test:
needs: pretty
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
- uses: actions/checkout@v3
- name: Install Dependencies
run: npm install -g pnpm && pnpm install
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test