Skip to content

Commit db974d1

Browse files
authored
Initial commit
0 parents  commit db974d1

24 files changed

+8960
-0
lines changed

.circleci/config.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
version: 2
2+
3+
aliases:
4+
- &restore-cache
5+
restore_cache:
6+
key: dependency-cache-{{ checksum "package.json" }}
7+
- &install-deps
8+
run:
9+
name: Install dependencies
10+
command: npm ci
11+
- &build-packages
12+
run:
13+
name: Build
14+
command: npm run build
15+
16+
jobs:
17+
build:
18+
working_directory: ~/nest
19+
docker:
20+
- image: circleci/node:16
21+
steps:
22+
- checkout
23+
- run:
24+
name: Update NPM version
25+
command: "sudo npm install -g npm@latest"
26+
- restore_cache:
27+
key: dependency-cache-{{ checksum "package.json" }}
28+
- run:
29+
name: Install dependencies
30+
command: npm ci
31+
- save_cache:
32+
key: dependency-cache-{{ checksum "package.json" }}
33+
paths:
34+
- ./node_modules
35+
- run:
36+
name: Build
37+
command: npm run build
38+
39+
workflows:
40+
version: 2
41+
build-and-test:
42+
jobs:
43+
- build

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# don't ever lint node_modules
2+
node_modules
3+
4+
# don't lint build output (make sure it's set to your correct build folder name)
5+
lib
6+
7+
# don't lint nyc coverage output
8+
coverage

.eslintrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint", "jest"],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:jest/recommended"
9+
]
10+
}

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
target-branch: "develop"
8+
labels:
9+
- "dependencies"
10.7 KB
Loading
Lines changed: 10 additions & 0 deletions
Loading

.github/images/figma-badge.png

3.79 KB
Loading

.github/workflows/coverage.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Running Code Coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [16.x]
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 2
19+
20+
- name: Set up Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Run the tests
29+
run: npm test -- --coverage
30+
- name: Upload coverage to Codecov
31+
uses: codecov/codecov-action@v2
32+
- name: Upload coverage to Codecov
33+
uses: codecov/codecov-action@v2
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Delete old workflow runs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
days:
6+
description: "Number of days."
7+
required: true
8+
default: 0
9+
minimum_runs:
10+
description: "The minimum runs to keep for each workflow."
11+
required: true
12+
default: 0
13+
delete_workflow_pattern:
14+
description: "The name or filename of the workflow. if not set then it will target all workflows."
15+
required: false
16+
delete_workflow_by_state_pattern:
17+
description: "Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually"
18+
required: true
19+
default: "All"
20+
type: choice
21+
options:
22+
- "All"
23+
- active
24+
- deleted
25+
- disabled_inactivity
26+
- disabled_manually
27+
dry_run:
28+
description: "Only log actions, do not perform any delete operations."
29+
required: false
30+
31+
jobs:
32+
del_runs:
33+
runs-on: windows-latest
34+
steps:
35+
- name: Delete workflow runs
36+
uses: Mattraks/delete-workflow-runs@v2
37+
with:
38+
token: ${{ github.token }}
39+
repository: ${{ github.repository }}
40+
retain_days: ${{ github.event.inputs.days }}
41+
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
42+
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
43+
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
44+
dry_run: ${{ github.event.inputs.dry_run }}

.github/workflows/npm-publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Node.js build and publish package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 16
15+
- run: npm i
16+
- run: npm test
17+
18+
publish-npm:
19+
needs: build
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 16
26+
registry-url: https://registry.npmjs.org/
27+
- run: npm i
28+
- run: npm run build
29+
- run: npm publish
30+
env:
31+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)