Skip to content

Commit 5384917

Browse files
authored
Merge pull request #46 from oslabs-beta/dev
Release 1.0.0
2 parents 93aa8d0 + e4ea61b commit 5384917

29 files changed

+13877
-16
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.eslintrc.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"root":true,
3+
"env": {
4+
"es2021": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"prettier"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": "latest",
15+
"sourceType": "module"
16+
},
17+
"plugins": [
18+
"@typescript-eslint"
19+
],
20+
"rules": {
21+
"import/extensions": "off",
22+
"@typescript-eslint/no-explicit-any": "off"
23+
},
24+
"overrides": [
25+
{
26+
"files": [
27+
"src/tests/**/*.ts"
28+
],
29+
"env": {
30+
"jest": true
31+
}
32+
}
33+
],
34+
"settings": {
35+
"import/resolver": {
36+
"node": {
37+
"extensions": [".js", ".ts"]
38+
}
39+
}
40+
}
41+
}

.github/workflows/deploy-dev.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: DEV CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
push:
8+
branches: [ dev ]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
# Steps represent a sequence of tasks that will be executed as part of the job
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v2
21+
22+
# Install dependencies
23+
- name: Install
24+
run: npm install
25+
26+
# Build package
27+
- name: Build
28+
run: npm run build
29+
30+
- name: NPM Publish to github package repo
31+
uses: JS-DevTools/npm-publish@v1
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
registry: https://npm.pkg.github.com/

.github/workflows/deploy-main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: PROD CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
push:
8+
tags:
9+
- '*'
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
13+
14+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
15+
jobs:
16+
deploy:
17+
runs-on: ubuntu-latest
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
23+
- name: Prepare
24+
run: npm run prepare:ci -- ${{ github.ref }}
25+
26+
# Install dependencies
27+
- name: Install
28+
run: npm install
29+
30+
# Build package
31+
- name: Build
32+
run: npm run build
33+
34+
- name: NPM Publish to github package repo
35+
uses: JS-DevTools/npm-publish@v1
36+
with:
37+
token: ${{ secrets.NPM_TOKEN }}
38+
registry: https://registry.npmjs.org/
39+
# access level for scoped packages -- by 1.0.0 we may unscope from @oslabs-beta
40+
access: restricted
41+
# just see if it works -- don't actually publish
42+
dry-run: true
43+
# only run if published version number differs from the one in package.json
44+
check-version: true
Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
# This is a basic workflow to help you get started with Actions
2-
32
name: DEV CI
43

54
# Controls when the workflow will run
65
on:
7-
# Triggers the workflow on push or pull request events but only for the main branch
8-
push:
9-
branches: [ dev ]
106
pull_request:
117
branches: [ dev ]
128

@@ -15,8 +11,8 @@ on:
1511

1612
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1713
jobs:
18-
# This workflow contains a single job called "build"
19-
prepare:
14+
# This workflow contains a single job called "format"
15+
format-lint:
2016
# The type of runner that the job will run on
2117
runs-on: ubuntu-latest
2218

@@ -25,16 +21,14 @@ jobs:
2521
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2622
- uses: actions/checkout@v2
2723

28-
# Runs a single command using the runners shell
29-
# - name: Build project
30-
# run: npm run build
24+
# Install dependencies
25+
- name: Install
26+
run: npm install
3127

32-
# Runs a single command using the runners shell
28+
# Format project
3329
- name: Format project
3430
run: npm run format
35-
36-
# Runs a set of commands using the runners shell
37-
# - name: Format project
38-
# run: |
39-
# echo Add other actions to build,
40-
# echo test, and deploy your project.
31+
32+
# Lint project
33+
- name: Lint project
34+
run: npm run lint

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: DEV CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
pull_request:
8+
branches: [ dev ]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
# Steps represent a sequence of tasks that will be executed as part of the job
18+
steps:
19+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
- uses: actions/checkout@v2
21+
22+
# Install dependencies
23+
- name: Install
24+
run: npm install
25+
26+
- name: Test
27+
run: npm test
28+

.github/workflows/version.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dev Version Increment
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
8+
jobs:
9+
version:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
- run: git config --global user.name 'PandaWhale CI'
16+
- run: git config --global user.email 'ci@pandawhale.it'
17+
- run: npm version patch -m "[DEV] %s"
18+
- run: git push
19+
20+

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm test
5+
npx lint-staged

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/*
2+
!dist/**/*
3+
!package.json
4+
!package-lock.json

0 commit comments

Comments
 (0)