Skip to content

Commit e32e098

Browse files
authored
Fix ACM paper parsing & Tests in CI (#333)
* πŸ› fix: Declare `message` * β™» refactor: Handle (and warn) non-string keys in `bibtexToString` * πŸ› fix: Fix ACM parsing * πŸ— build: Dev bundle * πŸ”„ ci: Fix build CI * πŸ§ͺ test: Default to headless * πŸ— build: Cleanup available package.json scripts &+ `test-ci` * πŸ§ͺ test: Add test action on push * πŸ§ͺ test: rename action * πŸ”„ ci: No sandbox for CI * πŸ— build: Add `--exit` flag for test-ci
1 parent ee1a38f commit e32e098

31 files changed

+550
-328
lines changed

β€Ž.github/workflows/build.ymlβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ jobs:
1010
with:
1111
node-version: "22.x"
1212

13-
- name: Install Yarn
14-
run: npm install --global yarn
1513
- name: Install dependencies
16-
run: yarn install
14+
run: npm install
1715
- name: Build
18-
run: gulp build
16+
run: npm run build

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: test-ci
2+
on: push
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- uses: actions/setup-node@v4
10+
with:
11+
node-version: "22.x"
12+
13+
- name: Install dependencies
14+
run: npm install
15+
- name: Build
16+
run: npm run test-ci

β€Žpackage.jsonβ€Ž

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,10 @@
1111
"scripts": {
1212
"pretest": "echo 'Make sure to be in dev mode (npm run dev)'",
1313
"test": "node --import ./register.mjs ./node_modules/.bin/mocha test/test-*.js",
14+
"pretest-ci": "npm run dev",
15+
"test-ci": "node --import ./register.mjs ./node_modules/.bin/mocha test/test-*.js --exclude *test-storage.js --exclude test/test-storage.js --exclude test/test-duplicates.js --exclude test/test-sync.js --exit",
1416
"pretest-cov": "echo 'Make sure to be in dev mode (npm run dev)'",
1517
"test-cov": "node --import ./register.mjs ./node_modules/.bin/nyc --reporter=text ./node_modules/.bin/mocha test/test-*.js",
16-
"pretest-storage": "echo 'Make sure to be in dev mode (npm run dev)'",
17-
"test-storage": "node --import ./register.mjs ./node_modules/.bin/mocha test/test-storage.js",
18-
"pretest-duplicates": "echo 'Make sure to be in dev mode (npm run dev)'",
19-
"test-duplicates": "node --import ./register.mjs ./node_modules/.bin/mocha test/test-duplicates.js",
20-
"pretest-sync": "echo 'Make sure to be in dev mode (npm run dev)'",
21-
"test-sync": "node --import ./register.mjs ./node_modules/.bin/mocha test/test-sync.js",
22-
"pretest-extension-loading": "echo 'Make sure to be in dev mode (npm run dev)'",
23-
"test-extension-loading": "node --import ./register.mjs ./node_modules/.bin/mocha test/test-extension-loading.js",
24-
"pretest-no-browser": "echo 'Make sure to be in dev mode (npm run dev)'",
25-
"test-no-browser": "node --import ./register.mjs ./node_modules/.bin/mocha 'test/test-!(storage|duplicates|sync|extension-loading)*.js'",
26-
"pretest-no-browser-cov": "echo 'Make sure to be in dev mode (npm run dev)'",
27-
"test-no-browser-cov": "node --import ./register.mjs ./node_modules/.bin/nyc --reporter=text ./node_modules/.bin/mocha 'test/test-!(storage|duplicates|sync|extension-loading)*.js'",
28-
"pretest-no-sync": "echo 'Make sure to be in dev mode (npm run dev)'",
29-
"test-no-sync": "node --import ./register.mjs ./node_modules/.bin/mocha 'test/test-!(sync)*.js'",
30-
"pretest-no-sync-cov": "echo 'Make sure to be in dev mode (npm run dev)'",
31-
"test-no-sync-cov": "node --import ./register.mjs ./node_modules/.bin/nyc --reporter=text ./node_modules/.bin/mocha 'test/test-!(sync)*.js'",
32-
"prescreenshots": "echo 'Make sure to be in dev mode (npm run dev)'",
33-
"screenshots": "node --import ./register.mjs ./node_modules/.bin/mocha test/screenshots.js",
3418
"dev": "rollup -c",
3519
"dev:watch": "rollup -c -w",
3620
"build": "NODE_ENV=production rollup -c"

β€Žsrc/background/background.bundle.jsβ€Ž

Lines changed: 43 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žsrc/background/background.bundle.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žsrc/bibMatcher/bibMatcher.bundle.jsβ€Ž

Lines changed: 43 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žsrc/bibMatcher/bibMatcher.bundle.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žsrc/content_scripts/content.bundle.jsβ€Ž

Lines changed: 43 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žsrc/content_scripts/content.bundle.js.mapβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)