Skip to content

Commit 35b8802

Browse files
authored
Merge pull request #2 from ListenNotes/cloudflare-workers
Add Cloudflare Workers support
2 parents bdc1c43 + fc44127 commit 35b8802

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+12052
-1272
lines changed

.eslintrc.js

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
module.exports = {
2-
"env": {
3-
"node": true,
2+
"env": {
3+
"node": true,
4+
"commonjs": true,
5+
"es2021": true
6+
},
7+
"extends": "eslint:recommended",
8+
"parserOptions": {
9+
"ecmaVersion": 12
10+
},
11+
"rules": {},
12+
13+
"ignorePatterns": ["**/examples/**"],
14+
15+
"overrides": [
16+
{
17+
"files": ["**/*ForWorkers*.js"],
18+
"env": {
19+
"node": false,
20+
"worker": true,
421
"commonjs": true,
522
"es2021": true
6-
},
7-
"extends": "eslint:recommended",
8-
"parserOptions": {
9-
"ecmaVersion": 12
10-
},
11-
"rules": {
12-
}
23+
},
24+
}
25+
]
1326
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Cloudflare Workers CI
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [18.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'yarn'
29+
- run: yarn install
30+
- run: yarn lint
31+
- run: yarn test-workers

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [10.x, 12.x, 14.x, 15.x, 16.x]
19+
node-version: [18.x]
2020
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2121

2222
steps:
@@ -28,4 +28,4 @@ jobs:
2828
cache: 'yarn'
2929
- run: yarn install
3030
- run: yarn lint
31-
- run: yarn test
31+
- run: yarn test-node

0 commit comments

Comments
 (0)