Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
9d56f2bcaThis file is pinned to the selected release. Download the original to open it in your design tool.
---
name: Pre-commit
on:
workflow_call:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Setup OpenSCAD
uses: ./.github/actions/setup-openscad
with:
scadm-source: cmd/scadm
- name: Cache flatten checksums
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: models/.flatten-checksums
key: flatten-checksums-${{ github.head_ref || github.ref_name }}
restore-keys: |
flatten-checksums-main
- name: Install test dependencies
run: |
set -euo pipefail
pip install -e cmd/scadfmt pytest -r requirements.txt
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: npm
cache-dependency-path: |
configurator/package-lock.json
site/package-lock.json
- name: Run pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1