-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #261 from APIDevTools/feat/fix-ci
fix: bump dependencies, fix tests, fix imports from deps
- Loading branch information
Showing
27 changed files
with
7,714 additions
and
65,012 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,8 +22,7 @@ jobs: | |
- macos-latest | ||
- windows-latest | ||
node: | ||
- 16 | ||
# - 18 TODO bring this back | ||
- 20 | ||
|
||
steps: | ||
- name: Checkout source | ||
|
@@ -33,7 +32,7 @@ jobs: | |
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: 'npm' | ||
cache: "npm" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
@@ -53,52 +52,13 @@ jobs: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel: true | ||
|
||
browser_tests: | ||
name: Browser Tests | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: | ||
- ubuntu-latest # Chrome, Firefox, Safari (TODO) | ||
# - windows-latest # Internet Explorer, Edge | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 12 | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run tests | ||
run: npm run coverage:browser | ||
|
||
- name: Combine code coverage data into a single file | ||
shell: bash | ||
run: | | ||
ls -Rlh coverage/*/lcov.info | ||
cat coverage/*/lcov.info > ./coverage/lcov.info | ||
- name: Send code coverage results to Coveralls | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel: true | ||
|
||
coverage: | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
needs: | ||
- node_tests | ||
- browser_tests | ||
steps: | ||
- name: Let Coveralls know that all tests have finished | ||
uses: coverallsapp/[email protected] | ||
|
@@ -113,17 +73,16 @@ jobs: | |
timeout-minutes: 10 | ||
needs: | ||
- node_tests | ||
- browser_tests | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 12 | ||
cache: 'npm' | ||
node-version: 20 | ||
cache: "npm" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import {build} from "esbuild"; | ||
import {polyfillNode} from "esbuild-plugin-polyfill-node"; | ||
|
||
await build({ | ||
entryPoints: ["online/src/js/index.js"], | ||
bundle: true, | ||
minify: true, | ||
sourcemap: 'external', | ||
target: 'chrome60', | ||
outfile: "online/js/bundle.js", | ||
plugins: [ | ||
polyfillNode({ | ||
// Options (optional) | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
"use strict"; | ||
|
||
const universalRules = require("./universal-rules"); | ||
const universalJSDocRules = require("./universal-jsdoc-rules"); | ||
const javascriptRules = require("./javascript-rules"); | ||
const javascriptJSDocRules = require("./javascript-jsdoc-rules"); | ||
const javascriptTestRules = require("./javascript-test-rules"); | ||
|
||
module.exports = { | ||
plugins: [ | ||
"jsdoc", | ||
], | ||
overrides: [ | ||
/** | ||
* JavaScript source files | ||
*/ | ||
{ | ||
files: ["**/*.{js,jsx}"], | ||
excludedFiles: "test/**", | ||
parserOptions: { | ||
sourceType: "script", | ||
ecmaVersion: 2020, | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
plugins: [ | ||
"jsdoc", | ||
], | ||
env: { | ||
es2020: true, | ||
commonjs: true, | ||
"shared-node-browser": true, | ||
}, | ||
rules: { | ||
...universalRules, | ||
...universalJSDocRules, | ||
...javascriptRules, | ||
...javascriptJSDocRules, | ||
} | ||
}, | ||
|
||
/** | ||
* JavaScript test files | ||
*/ | ||
{ | ||
files: ["test/**/*.{js,jsx}"], | ||
parserOptions: { | ||
sourceType: "script", | ||
ecmaVersion: 2020, | ||
}, | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
env: { | ||
es2020: true, | ||
commonjs: true, | ||
"shared-node-browser": true, | ||
mocha: true, | ||
jasmine: true, | ||
}, | ||
rules: { | ||
...universalRules, | ||
...javascriptRules, | ||
...javascriptTestRules, | ||
} | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"use strict"; | ||
|
||
/** | ||
* JSDoc rules for JavaScript and TypeScript | ||
*/ | ||
module.exports = { | ||
/** | ||
* @see https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-types | ||
*/ | ||
"jsdoc/check-types": "warn", | ||
|
||
/** | ||
* @see https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-no-undefined-types | ||
*/ | ||
"jsdoc/no-undefined-types": "warn", | ||
|
||
/** | ||
* @see https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type | ||
*/ | ||
"jsdoc/require-param-type": "warn", | ||
|
||
/** | ||
* @see https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-property-type | ||
*/ | ||
"jsdoc/require-property-type": "warn", | ||
|
||
/** | ||
* @see https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-returns-type | ||
*/ | ||
"jsdoc/require-returns-type": "warn", | ||
|
||
/** | ||
* @see https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-valid-types | ||
*/ | ||
"jsdoc/valid-types": "warn", | ||
}; |
Oops, something went wrong.