mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
* Error if Prettier isn't already installed * Temporarily run Prettier check on every commit * Install and run Prettier via package.json * Trigger another prettier check on CI
22 lines
571 B
YAML
22 lines
571 B
YAML
name: Check JavaScript for conformance with Prettier
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
prettier:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out repo
|
|
uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
name: Configure npm caching
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.OS }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.OS }}-npm-
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Run prettier
|
|
run: |-
|
|
npx --no-install prettier --check 'datasette/static/*[!.min].js'
|