Merge pull request #1934 from BryceLTaylor/circleci-tests

Circleci tests
This commit is contained in:
Bryce Taylor 2022-04-01 15:14:18 -04:00 committed by GitHub
commit 6739802bc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 7 deletions

View file

@ -17,10 +17,10 @@ aliases:
mkdir ./test/results mkdir ./test/results
- &lint - &lint
name: "run lint tests" name: "run lint tests"
command: npm run lint command: npm run lint -- --format junit -o ./test/results/lint-results.xml
- &unit - &unit
name: "run unit tests" name: "run unit tests"
command: npm run unit command: JEST_JUNIT_OUTPUT_NAME=unit-jest-results.xml npm run unit -- --reporters=jest-junit
- &build - &build
name: "run npm build" name: "run npm build"
command: | command: |
@ -39,6 +39,8 @@ jobs:
<<: *unit <<: *unit
- run: - run:
<<: *build <<: *build
- store_test_results:
path: test/results
workflows: workflows:
build-test-no-deploy: build-test-no-deploy:

3
.gitignore vendored
View file

@ -16,3 +16,6 @@ dist/*
# generated translation files # generated translation files
/translations /translations
/locale /locale
# tests
/test/results/*

47
package-lock.json generated
View file

@ -5921,9 +5921,9 @@
"dev": true "dev": true
}, },
"eslint-config-scratch": { "eslint-config-scratch": {
"version": "6.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-scratch/-/eslint-config-scratch-6.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-config-scratch/-/eslint-config-scratch-7.0.0.tgz",
"integrity": "sha512-2aW7EVWhjTrwaM54hjAZeRETh/habWeQ5xzTbPO2dG//RtixBztUAmdxqAHKH8MEtmAMsUhf3mRjO1BstO4dGg==", "integrity": "sha512-8Ko7aaC+Gv09lyz3x7+EaVZ68ga/4mnfGgwH1Jz/MnR4UJyJyYtUOtlWxsPspPOlPZzDAVL5CKEcxmCX24SrJA==",
"dev": true, "dev": true,
"requires": { "requires": {
"eslint-plugin-react": ">=7.14.2" "eslint-plugin-react": ">=7.14.2"
@ -10238,6 +10238,41 @@
} }
} }
}, },
"jest-junit": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-13.0.0.tgz",
"integrity": "sha512-JSHR+Dhb32FGJaiKkqsB7AR3OqWKtldLd6ZH2+FJ8D4tsweb8Id8zEVReU4+OlrRO1ZluqJLQEETm+Q6/KilBg==",
"dev": true,
"requires": {
"mkdirp": "^1.0.4",
"strip-ansi": "^6.0.1",
"uuid": "^8.3.2",
"xml": "^1.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true
},
"strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.1"
}
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true
}
}
},
"jest-leak-detector": { "jest-leak-detector": {
"version": "22.4.3", "version": "22.4.3",
"resolved": "http://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-22.4.3.tgz", "resolved": "http://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-22.4.3.tgz",
@ -21460,6 +21495,12 @@
"async-limiter": "~1.0.0" "async-limiter": "~1.0.0"
} }
}, },
"xml": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz",
"integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=",
"dev": true
},
"xml-name-validator": { "xml-name-validator": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",

View file

@ -13,7 +13,7 @@
"lint": "eslint . --ext .js,.jsx", "lint": "eslint . --ext .js,.jsx",
"start": "webpack-dev-server", "start": "webpack-dev-server",
"test": "npm run lint && npm run unit && NODE_ENV=production npm run build", "test": "npm run lint && npm run unit && NODE_ENV=production npm run build",
"unit": "jest", "unit": "jest --reporters=default",
"watch": "webpack --progress --colors --watch" "watch": "webpack --progress --colors --watch"
}, },
"author": "Massachusetts Institute of Technology", "author": "Massachusetts Institute of Technology",
@ -62,13 +62,14 @@
"enzyme-adapter-react-16": "1.15.6", "enzyme-adapter-react-16": "1.15.6",
"eslint": "5.16.0", "eslint": "5.16.0",
"eslint-config-import": "0.13.0", "eslint-config-import": "0.13.0",
"eslint-config-scratch": "6.0.0", "eslint-config-scratch": "7.0.0",
"eslint-plugin-import": "2.23.4", "eslint-plugin-import": "2.23.4",
"eslint-plugin-react": "7.20.3", "eslint-plugin-react": "7.20.3",
"gh-pages": "github:rschamp/gh-pages#publish-branch-to-subfolder", "gh-pages": "github:rschamp/gh-pages#publish-branch-to-subfolder",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "3.2.0",
"jest": "22.4.4", "jest": "22.4.4",
"jest-canvas-mock": "2.3.1", "jest-canvas-mock": "2.3.1",
"jest-junit": "13.0.0",
"json": "9.0.6", "json": "9.0.6",
"lodash.defaultsdeep": "4.6.1", "lodash.defaultsdeep": "4.6.1",
"mkdirp": "1.0.4", "mkdirp": "1.0.4",
@ -114,6 +115,9 @@
"\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js" "\\.(css|less)$": "<rootDir>/test/__mocks__/styleMock.js"
} }
}, },
"jest-junit": {
"outputDirectory": "./test/results"
},
"browserslist": [ "browserslist": [
"last 3 versions", "last 3 versions",
"Safari >= 8", "Safari >= 8",