Skip to content

Commit

Permalink
ci: check formatting and jsr publish (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic authored Jul 3, 2024
1 parent 1976f2c commit 4fcd8e0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
branches:
- main
jobs:
lint:
name: Lint
verify_files:
name: Verify Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -18,10 +18,12 @@ jobs:
node-version: "lts/*"
- name: Install dependencies
run: npm install
- name: Build commonjs
- name: Build
run: npm run build
- name: Lint files
run: npm run lint
- name: Check Formatting
run: npm run fmt:check
test:
name: Test
strategy:
Expand All @@ -43,3 +45,17 @@ jobs:
run: npm install
- name: Run tests
run: npm run test
jsr_test:
name: Verify JSR Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install Packages
run: npm install
- name: Run --dry-run
run: |
npm run build
npm run test:jsr
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
CHANGELOG.md
jsr.json
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ To use the recommended configuration for this plugin, specify your matching `fil
import json from "@eslint/json";

export default [

// lint JSON files
{
files: ["**/*.json"],
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"test:jsr": "npx jsr@latest publish --dry-run",
"pretest": "npm run build",
"lint": "eslint",
"fmt": "prettier --write .",
"fmt:check": "prettier --check .",
"test": "mocha tests/**/*.js",
"test:coverage": "c8 npm test"
},
Expand Down

0 comments on commit 4fcd8e0

Please sign in to comment.