Skip to content

Commit 92cd1ed

Browse files
authored
Update CI matrices and other chores (#494)
- Update node and browser matrices to supported versions - Refactor tests and filenames to natively work with .mjs modules - Fix development with older node versions
1 parent 8802a3e commit 92cd1ed

Some content is hidden

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

73 files changed

+2226
-2070
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [14.x, 16.x, 18.x, 20.x]
15+
node-version: [18.x, 20.x, 22.x]
1616
steps:
1717
- uses: actions/checkout@v3
1818
- name: Use Node.js ${{ matrix.node-version }}
@@ -21,10 +21,7 @@ jobs:
2121
node-version: ${{ matrix.node-version }}
2222
cache: 'npm'
2323
- run: npm install
24-
- name: 'Setup tests'
25-
run: bash test/setup.sh
26-
- name: 'Run basic tests'
27-
run: bash test/run.sh
24+
- run: npm test
2825

2926
integration:
3027
runs-on: ubuntu-latest
@@ -36,10 +33,15 @@ jobs:
3633
node-version: 'lts/*'
3734
cache: 'npm'
3835
- run: npm install
39-
- name: 'Setup dist'
40-
run: bash test/setup.sh --dist
41-
- name: 'Run complete test suite'
42-
run: bash test/run.sh --dist
36+
- name: Run coverage
37+
run: |
38+
npm run build
39+
npm run test:coverage
40+
- name: Run browser tests
41+
if: ${{ github.secret_source == 'Actions' }}
42+
run: |
43+
npm run copy
44+
npm run test:ci
4345
env:
4446
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
4547
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}

.github/workflows/release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ jobs:
1313
with:
1414
node-version: 'lts/*'
1515
cache: 'npm'
16-
- name: Configure npm
16+
- run: npm install
17+
- name: configure npm
1718
run: |
1819
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
19-
cat .npmrc
2020
env:
2121
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22-
- run: npm install
23-
- run: npm publish --workspaces
22+
- name: publish to npm
23+
run: npm publish --workspaces
2424
env:
2525
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26-
- run: npm run dist:postpublish
26+
- name: postpublish
27+
run: npm run dist:postpublish
2728
- uses: actions/upload-artifact@v3
2829
with:
2930
name: linkify

.mocharc.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
require: '@babel/register'
1+
ignore:
2+
- 'test/qunit/*'
3+
- 'test/conf.js'
4+
- 'test/*.conf.js'

babel.config.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

babel.config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"useBuiltIns": false,
7+
"loose": true,
8+
"targets": {
9+
"node": "10",
10+
"browsers": ["defaults", "maintained node versions"]
11+
}
12+
}
13+
]
14+
],
15+
"babelrcRoots": [".", "packages/*"]
16+
}

0 commit comments

Comments
 (0)