Skip to content

Commit

Permalink
Update CI matrices and other chores (#494)
Browse files Browse the repository at this point in the history
- Update node and browser matrices to supported versions
- Refactor tests and filenames to natively work with .mjs modules
- Fix development with older node versions
  • Loading branch information
nfrasser authored Nov 19, 2024
1 parent 8802a3e commit 92cd1ed
Show file tree
Hide file tree
Showing 73 changed files with 2,226 additions and 2,070 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -21,10 +21,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- name: 'Setup tests'
run: bash test/setup.sh
- name: 'Run basic tests'
run: bash test/run.sh
- run: npm test

integration:
runs-on: ubuntu-latest
Expand All @@ -36,10 +33,15 @@ jobs:
node-version: 'lts/*'
cache: 'npm'
- run: npm install
- name: 'Setup dist'
run: bash test/setup.sh --dist
- name: 'Run complete test suite'
run: bash test/run.sh --dist
- name: Run coverage
run: |
npm run build
npm run test:coverage
- name: Run browser tests
if: ${{ github.secret_source == 'Actions' }}
run: |
npm run copy
npm run test:ci
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ jobs:
with:
node-version: 'lts/*'
cache: 'npm'
- name: Configure npm
- run: npm install
- name: configure npm
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
cat .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm install
- run: npm publish --workspaces
- name: publish to npm
run: npm publish --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run dist:postpublish
- name: postpublish
run: npm run dist:postpublish
- uses: actions/upload-artifact@v3
with:
name: linkify
Expand Down
5 changes: 4 additions & 1 deletion .mocharc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
require: '@babel/register'
ignore:
- 'test/qunit/*'
- 'test/conf.js'
- 'test/*.conf.js'
24 changes: 0 additions & 24 deletions babel.config.js

This file was deleted.

16 changes: 16 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": false,
"loose": true,
"targets": {
"node": "10",
"browsers": ["defaults", "maintained node versions"]
}
}
]
],
"babelrcRoots": [".", "packages/*"]
}
Loading

0 comments on commit 92cd1ed

Please sign in to comment.