Skip to content

Commit 2540a00

Browse files
committed
feat: add configuration sources and tests
1 parent d781595 commit 2540a00

File tree

13 files changed

+938
-27
lines changed

13 files changed

+938
-27
lines changed

.github/renovate.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,26 @@
1515
},
1616
"packageRules": [
1717
{
18-
"description": "Auto-merge dependencies",
18+
"description": "Auto-merge dependencies.",
1919
"depTypeList": ["devDependencies", "dependencies"],
2020
"updateTypes": ["pin", "digest", "patch", "minor"],
2121
"automerge": true
22+
},
23+
{
24+
"packagePatterns": ["^@commitlint/"],
25+
"depTypeList": ["devDependencies"],
26+
"groupName": "devDependencies commitlint monorepo"
27+
},
28+
{
29+
"packagePatterns": ["^@commitlint/"],
30+
"depTypeList": ["dependencies"],
31+
"groupName": "dependencies commitlint monorepo"
32+
},
33+
{
34+
"description": "Disable for aliased packages with final version.",
35+
"packagePatterns": ["^@commitlint/(lint|load)\\-(9|10)\\.x"],
36+
"depTypeList": ["devDependencies"],
37+
"enabled": false
2238
}
2339
],
2440
"prCreation": "not-pending"

.github/workflows/build.yml

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,63 @@ jobs:
1616
- name: Setup node
1717
uses: actions/setup-node@v2.1.1
1818
with:
19-
node-version: 12
19+
node-version: 14
2020
- name: Install project
2121
run: npm ci --ignore-scripts
2222
- name: Lint
2323
run: npm run lint-es
2424
- name: Check formatting
2525
run: npm run format:check
26+
build:
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 5
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v2.3.2
32+
- name: Setup node
33+
uses: actions/setup-node@v2.1.1
34+
with:
35+
node-version: 14
36+
- name: Install project
37+
run: npm ci --ignore-scripts
38+
- name: Build
39+
run: npm run build
40+
test:
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 5
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v2.3.2
46+
- name: Setup node
47+
uses: actions/setup-node@v2.1.1
48+
with:
49+
node-version: 14
50+
- name: Install project
51+
run: npm ci --ignore-scripts
52+
- name: Test
53+
run: npm run test:ci
54+
code-coverage:
55+
needs: [lint, build, test]
56+
runs-on: ubuntu-latest
57+
timeout-minutes: 5
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v2.3.2
61+
- name: Setup node
62+
uses: actions/setup-node@v2.1.1
63+
with:
64+
node-version: 14
65+
- name: Install project
66+
run: npm ci --ignore-scripts
67+
- name: Test
68+
run: npm run test:ci
69+
- name: Upload coverage to Codecov
70+
uses: codecov/codecov-action@v1.0.10
71+
with:
72+
token: ${{ secrets.CODECOV_TOKEN }}
73+
file: ./coverage/cobertura-coverage.xml
2674
release:
27-
needs: lint
75+
needs: [lint, build, test, code-coverage]
2876
runs-on: ubuntu-latest
2977
# GitHub API requests can easy take a couple of seconds and the release can
3078
# make lots of API requests when a release has a lot of commits. If every
@@ -40,14 +88,17 @@ jobs:
4088
- name: Setup node
4189
uses: actions/setup-node@v2.1.1
4290
with:
43-
node-version: 12
91+
node-version: 14
4492
- name: Install project
4593
run: npm ci --ignore-scripts
94+
- name: Build
95+
run: npm run build
4696
- name: Release
4797
env:
4898
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GITHUB_TOKEN }}
4999
GIT_AUTHOR_NAME: vidavidorra-release
50100
GIT_AUTHOR_EMAIL: 65564857+vidavidorra-release@users.noreply.github.com
51101
GIT_COMMITTER_NAME: vidavidorra-release
52102
GIT_COMMITTER_EMAIL: 65564857+vidavidorra-release@users.noreply.github.com
103+
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
53104
run: npx --no-install semantic-release

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ module.exports = {
44
coverageDirectory: 'coverage',
55
coverageReporters: ['cobertura', 'lcov', 'text'],
66
preset: 'ts-jest',
7-
roots: ['<rootDir>/src'],
7+
roots: ['<rootDir>/src', '<rootDir>/test'],
88
};

0 commit comments

Comments
 (0)