mirror of
https://github.com/detleph/server.git
synced 2026-09-06 23:44:26 +02:00
Create workflow to check formatting
The workflow checks whether all the files are formatted correctly (.prettierrc)
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
# This workflow checks whether all files conform with the Prettier configuration
|
||||||
|
|
||||||
|
name: Check prettier formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Job to check the formatting
|
||||||
|
check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
|
||||||
|
- name: Install prettier
|
||||||
|
run: npm i -g prettier
|
||||||
|
|
||||||
|
- name: Check formatting
|
||||||
|
run: prettier -c .
|
||||||
Reference in New Issue
Block a user