Skip to content

Commit 31034e5

Browse files
Add github action for CI (lint, check format, build) (#53)
1 parent 7370108 commit 31034e5

File tree

4 files changed

+53
-5
lines changed

4 files changed

+53
-5
lines changed

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
* text eol=lf
2+
*.exe binary
3+
*.png binary
4+
*.jpg binary
5+
*.jpeg binary
6+
*.ico binary
7+
*.icns binary
8+
*.eot binary
9+
*.otf binary
10+
*.ttf binary
11+
*.woff binary
12+
*.woff2 binary
13+
*.ldml binary
14+
*.zip binary

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest]
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run all linters
31+
run: npm run lint
32+
33+
- name: Run format checking
34+
run: npm run format:check

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ This is a Webpack project configured to build Platform.Bible extensions. The gen
8181

8282
## To install
8383

84-
### Install dependencies:
84+
### Install dependencies
8585

8686
1. Follow the instructions to install [`paranext-core`](https://github.com/paranext/paranext-core#developer-install). We recommend you clone `paranext-core` in the same parent directory in which you cloned this repository so you do not have to [reconfigure paths](#configure-paths-to-paranext-core-repo) to `paranext-core`.
8787
2. In this repo, run `npm install` to install local and published dependencies
@@ -155,7 +155,7 @@ These steps will walk you through releasing a version on GitHub and bumping the
155155
<details>
156156
<summary>[Optional] Create a new pre-release and bump versions branch manually </summary>
157157

158-
#### Manually create a new pre-release and bump versions branch
158+
### Manually create a new pre-release and bump versions branch
159159

160160
Alternatively, you can create a new pre-release manually:
161161

@@ -197,7 +197,7 @@ Following are some problems you may encounter while publishing and steps to solv
197197

198198
If you see the following error in the GitHub Actions workflow logs while packaging:
199199

200-
```
200+
```bash
201201
Module build failed (from ./node_modules/swc-loader/src/index.js):
202202
Error: Failed to load native binding
203203
```
@@ -223,7 +223,7 @@ Then follow [the instructions for customizing the new extension](https://github.
223223
<details>
224224
<summary>[Optional] Creating a new extension manually</summary>
225225

226-
#### Manually create a new extension
226+
### Manually create a new extension
227227

228228
Alternatively, you can create a new extension manually:
229229

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"start:production": "cross-env MAIN_ARGS=\"--extensionDirs $INIT_CWD/dist\" concurrently \"npm:watch:production\" \"npm:start:core\"",
2222
"lint": "npm run lint:scripts && npm run lint:styles",
2323
"lint:scripts": "cross-env NODE_ENV=development eslint --ext .cjs,.js,.jsx,.ts,.tsx --cache .",
24-
"lint:styles": "stylelint **/*.{css,scss}",
24+
"lint:styles": "stylelint **/*.{css,scss} --allow-empty-input",
2525
"lint-fix": "npm run lint-fix:scripts && npm run lint:styles -- --fix",
2626
"lint-fix:scripts": "npm run format && npm run lint:scripts",
2727
"postinstall": "tsx ./lib/add-remotes.ts",

0 commit comments

Comments
 (0)