Skip to content

Commit

Permalink
Add test workflow
Browse files Browse the repository at this point in the history
Check for uncommitted Prettier changes
  • Loading branch information
anthony-j-castro committed Jan 17, 2024
1 parent f91a1da commit e86b54d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test branch

on: push

concurrency:
group:
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Check for uncommitted Prettier changes
run: npm run prettier:ci
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"description": "Reusable Prettier config for projects by @anthony-j-castro.",
"private": true,
"main": ".prettierrc.json",
"scripts": {
"prettier": "prettier . --write",
"prettier:ci": "prettier . --check"
},
"keywords": [
"prettier",
"prettierconfig"
Expand Down

0 comments on commit e86b54d

Please sign in to comment.