Skip to content

⬆️ deps: Upgrade dependency lint-staged to v15.2.11. #467

⬆️ deps: Upgrade dependency lint-staged to v15.2.11.

⬆️ deps: Upgrade dependency lint-staged to v15.2.11. #467

Workflow file for this run

name: ci:precommit
on:
push:
branches:
- main
pull_request:
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: Continuous integration (test precommit)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
# TODO Fetch sparingly with something similar to
# https://github.com/rmacklin/fetch-through-merge-base/blob/main/action.yml
# Maybe could use commit count (does not exist on merge_group
# somehow)
# Maybe setting .git/shallow to base first would work in all cases?
# See https://stackoverflow.com/a/76573878
fetch-depth: 0
- name: Compute MERGE_BASE and HEAD_SHA 📜
id: event
uses: ./.github/actions/github/event
- name: Stage MERGE_BASE...HEAD_SHA ⏮️
env:
HEAD_SHA: ${{ steps.event.outputs.head-sha }}
MERGE_BASE: ${{ steps.event.outputs.merge-base }}
run: |
git reset --hard "${HEAD_SHA}"
git reset --soft "${MERGE_BASE}"
# TODO Do something destructive to check that it is not picked up.
- name: Install 💾
uses: ./.github/actions/install
- name: Run precommit 🔬
run: |
npm run precommit