-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: cleanup & add test infrastructure (#36)
* build: remove unused tslint config file * build: cleanup package.json * build(deps-dev): upgrade @types/fs-extra to 8.1.0 * build(deps-dev): remove unused electron devDependency * build(deps-dev): upgrade @types/node to ^13.7.7 * build(deps-dev): upgrade prettier to 1.19.1 * build(deps-dev): upgrade typescript to 3.8.3 * build: reformat .circleci/config.yml * test: add jest + a basic test for parseNotarizationInfo * build: don't compile test files by default
- Loading branch information
Showing
7 changed files
with
2,531 additions
and
412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
version: 2 | ||
jobs: | ||
test: | ||
docker: | ||
- image: circleci/node:12 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: yarn --frozen-lockfile | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
paths: | ||
- ./node_modules | ||
- run: yarn lint | ||
release: | ||
docker: | ||
- image: circleci/node:10 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: yarn --frozen-lockfile | ||
- run: npx semantic-release | ||
test: | ||
docker: | ||
- image: circleci/node:12 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: yarn --frozen-lockfile | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
paths: | ||
- ./node_modules | ||
- run: yarn lint | ||
- run: yarn test | ||
release: | ||
docker: | ||
- image: circleci/node:10 | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: yarn --frozen-lockfile | ||
- run: npx semantic-release | ||
workflows: | ||
version: 2 | ||
test_and_release: | ||
# release when tests are successful | ||
jobs: | ||
version: 2 | ||
test_and_release: | ||
# release when tests are successful | ||
jobs: | ||
- test | ||
- release: | ||
requires: | ||
- test | ||
- release: | ||
requires: | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
|
||
filters: | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { parseNotarizationInfo } from '../src/helpers'; | ||
|
||
describe('helpers', () => { | ||
describe('parseNotarizationInfo', () => { | ||
test('build a NotarizationInfo object', () => { | ||
const output = ` | ||
RequestUUID: 123 | ||
Date: 2020-01-01 | ||
Status: unknown | ||
`; | ||
expect(parseNotarizationInfo(output)).toEqual({ | ||
date: new Date('2020-01-01'), | ||
status: 'unknown', | ||
uuid: '123', | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,8 @@ | |
"declaration": true, | ||
"skipDefaultLibCheck": true, | ||
"skipLibCheck": true, | ||
} | ||
} | ||
}, | ||
"include": [ | ||
"src/**/*" | ||
], | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.