Skip to content

Commit

Permalink
Merge pull request #797 from wheresrhys/rhys/browser-tests
Browse files Browse the repository at this point in the history
Rhys/browser tests
  • Loading branch information
wheresrhys authored Aug 13, 2024
2 parents 1d83f42 + 2ed8191 commit bf2a29c
Show file tree
Hide file tree
Showing 43 changed files with 3,036 additions and 4,816 deletions.
65 changes: 16 additions & 49 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ version: 2.0

references:
triggerable-by-tag: &triggerable-by-tag
# For a tag push unaffected by any filters, CircleCI skips the job
# https://circleci.com/docs/2.0/workflows/#git-tag-job-execution
filters:
tags:
only: /.*/

node18: &node18
docker:
- image: cimg/node:18.0
nodelts: &nodelts
docker:
- image: cimg/node:lts
# browsers: &browsers
# docker:
# - image: circleci/node:12.18.3-browsers
browsers: &browsers
docker:
- image: cimg/node:lts-browsers
nodecurrent: &nodecurrent
docker:
- image: cimg/node:current
Expand Down Expand Up @@ -76,43 +77,21 @@ jobs:
- run: npm run test:ci
- store_test_results:
path: test-results

nodefetch3:
<<: *nodelts
steps:
- *workspace
- run: npm install node-fetch@3
- run: TESTING_ENV=node-fetch npm run test:legacy

commonjs:
<<: *nodelts
test-node18:
<<: *node18
steps:
- *workspace
- run: npm run build
- run: TESTING_ENV=commonjs npm run test:legacy
jest:
<<: *nodelts
- run: npm run test:ci
test-browser:
<<: *browsers
steps:
- *workspace
- run: npm run build
- run: npm run test:jest
- run: npm run test:browser
module-compat:
<<: *nodelts
steps:
- *workspace
- run: npm run compat:module
# chrome:
# <<: *browsers
# steps:
# - *workspace
# - run: TEST_BROWSER=Chrome make test-browser

# firefox:
# <<: *browsers
# steps:
# - *workspace
# - run: npm install karma-firefox-launcher
# - run: TEST_BROWSER=Firefox make test-browser

publish:
<<: *nodelts
Expand Down Expand Up @@ -146,36 +125,24 @@ workflows:
- typecheck:
<<: *triggerable-by-tag
<<: *after-build-lint
- nodefetch3:
- test-browser:
<<: *triggerable-by-tag
<<: *after-build-test-lint
- commonjs:
- test-node18:
<<: *triggerable-by-tag
<<: *after-build-test-lint
- jest:
<<: *triggerable-by-tag
<<: *after-build-lint
- module-compat:
<<: *triggerable-by-tag
<<: *after-build-lint
# - chrome:
# <<: *triggerable-by-tag
# <<: *after-build-test-lint
# - firefox:
# <<: *triggerable-by-tag
# <<: *after-build-test-lint
- publish:
requires:
- nodefetch3
# - chrome
# - firefox
- test-node18
- test-browser
- build
- test
- lint
- module-compat
- typecheck
- commonjs
- jest
filters:
branches:
ignore: /.*/
Expand Down
Loading

0 comments on commit bf2a29c

Please sign in to comment.