Skip to content

Commit 4681260

Browse files
committed
feat: initial commit
0 parents  commit 4681260

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+5528
-0
lines changed

.eslintrc.cjs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const path = require("path")
2+
3+
4+
module.exports = {
5+
root: true,
6+
extends: [
7+
// https://github.com/AlansCodeLog/eslint-config
8+
"@alanscodelog/eslint-config/vue",
9+
"plugin:storybook/recommended"
10+
],
11+
// for vscode, so it doesn't try to lint files in here when we open them
12+
ignorePatterns: [
13+
"coverage",
14+
"dist",
15+
"docs",
16+
"**/*.scss",
17+
"**/*.html"
18+
],
19+
parser: "vue-eslint-parser",
20+
parserOptions: {
21+
parser: "@typescript-eslint/parser",
22+
ecmaVersion: 2020,
23+
sourceType: "module",
24+
project: path.resolve("./tsconfig.json"),
25+
tsconfigRootDir: path.resolve("./"),
26+
// debugLevel: true
27+
},
28+
rules: {
29+
},
30+
overrides: [
31+
{
32+
files: ["./*.{js,cjs,ts,vue}"],
33+
rules: {
34+
"@typescript-eslint/explicit-function-return-type": "off",
35+
}
36+
}
37+
// Eslint: https://eslint.org/docs/rules/
38+
// Typescript: https://typescript-eslint.io/rules/
39+
// Vue: https://eslint.vuejs.org/rules/
40+
// {
41+
// files: ["**/*.js", "**/*.ts", "**/*.vue"],
42+
// rules: {
43+
// },
44+
// },
45+
],
46+
}

.github/workflows/build-only.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build-Only
2+
# for debugging failing builds (including docs) without releasing or touching master
3+
# does not use cache
4+
5+
env:
6+
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
7+
8+
on:
9+
push:
10+
branches: [ build, experimental ]
11+
repository_dispatch:
12+
types: [ build-only ]
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node-version: ["lts/-2", "latest"]
20+
21+
steps:
22+
23+
# region Setup
24+
- uses: actions/checkout@v2
25+
26+
- name: Setting Up Node.js (${{ matrix.node-version }})
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- uses: pnpm/action-setup@v2.0.1
32+
name: Install pnpm
33+
id: pnpm-install
34+
with:
35+
version: latest
36+
37+
- name: Get Pnpm Cache Path
38+
id: pnpm-cache
39+
run: |
40+
echo "::set-output name=dir::$(pnpm store path)"
41+
42+
- uses: actions/cache@v3
43+
name: pnpm cache
44+
with:
45+
path: ${{ steps.pnpm-cache.outputs.dir }}
46+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
47+
restore-keys: |
48+
${{ runner.os }}-pnpm-store-
49+
50+
- run: "echo Cache Key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
51+
- run: "echo Cache Restore-Keys: ${{ runner.os }}-pnpm-store-"
52+
- run: "echo Pnpm Cache Hit: ${{ steps.pnpm-cache.outputs.cache-hit }}"
53+
# regionend
54+
55+
# region Steps
56+
- run: pnpm install --frozen-lockfile
57+
if: "env.USE_LOCKFILE == 'true'"
58+
59+
- run: pnpm install --no-lockfile
60+
if: "env.USE_LOCKFILE != 'true'"
61+
62+
- run: pnpm build
63+
64+
- run: pnpm lint
65+
66+
# - run: pnpm test
67+
# regionend

.github/workflows/build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build
2+
# not technically necessary because release also runs tests but this way the build badge is separate
3+
4+
env:
5+
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
6+
7+
on:
8+
#TOCONFIGURE
9+
# schedule:
10+
# # every first of the month at 12:00 noon GMT-3
11+
# # https://crontab.guru/#0_12_1_*_*
12+
# - cron: '0 15 1 * *'
13+
push:
14+
branches: [ master ]
15+
repository_dispatch:
16+
types: [ build ]
17+
18+
jobs:
19+
build:
20+
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
node-version: ["lts/-2", "latest"]
25+
26+
steps:
27+
28+
# region Setup
29+
- uses: actions/checkout@v2
30+
31+
- name: Setting Up Node.js (${{ matrix.node-version }})
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
36+
- uses: pnpm/action-setup@v2.0.1
37+
name: Install pnpm
38+
id: pnpm-install
39+
with:
40+
version: latest
41+
42+
- name: Get Pnpm Cache Path
43+
id: pnpm-cache
44+
run: |
45+
echo "::set-output name=dir::$(pnpm store path)"
46+
47+
- uses: actions/cache@v3
48+
name: pnpm cache
49+
with:
50+
path: ${{ steps.pnpm-cache.outputs.dir }}
51+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
52+
restore-keys: |
53+
${{ runner.os }}-pnpm-store-
54+
55+
- run: "echo Cache Key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
56+
- run: "echo Cache Restore-Keys: ${{ runner.os }}-pnpm-store-"
57+
- run: "echo Pnpm Cache Hit: ${{ steps.pnpm-cache.outputs.cache-hit }}"
58+
# regionend
59+
60+
# region Steps
61+
- run: pnpm install --frozen-lockfile
62+
if: "env.USE_LOCKFILE == 'true'"
63+
64+
- run: pnpm install --no-lockfile
65+
if: "env.USE_LOCKFILE != 'true'"
66+
67+
- run: pnpm build
68+
69+
- run: pnpm lint
70+
71+
# - run: pnpm test
72+
# regionend

.github/workflows/docs.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Docs
2+
3+
env:
4+
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
5+
ENABLE_DOCS: ${{ secrets.ENABLE_DOCS }}
6+
7+
on:
8+
push:
9+
branches: [ master ]
10+
repository_dispatch:
11+
types: [ docs ]
12+
13+
jobs:
14+
docs:
15+
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
node-version: ["latest"]
20+
21+
steps:
22+
23+
# region Setup
24+
- uses: actions/checkout@v2
25+
26+
- name: Setting Up Node.js (${{ matrix.node-version }})
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- uses: pnpm/action-setup@v2.0.1
32+
name: Install pnpm
33+
id: pnpm-install
34+
with:
35+
version: latest
36+
37+
- name: Get Pnpm Cache Path
38+
id: pnpm-cache
39+
run: |
40+
echo "::set-output name=dir::$(pnpm store path)"
41+
42+
- uses: actions/cache@v3
43+
name: pnpm cache
44+
with:
45+
path: ${{ steps.pnpm-cache.outputs.dir }}
46+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
47+
restore-keys: |
48+
${{ runner.os }}-pnpm-store-
49+
50+
- run: "echo Cache Key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
51+
- run: "echo Cache Restore-Keys: ${{ runner.os }}-pnpm-store-"
52+
- run: "echo Pnpm Cache Hit: ${{ steps.pnpm-cache.outputs.cache-hit }}"
53+
# regionend
54+
55+
- run: pnpm install --frozen-lockfile
56+
if: "env.USE_LOCKFILE == 'true'"
57+
58+
- run: pnpm install --no-lockfile
59+
if: "env.USE_LOCKFILE != 'true'"
60+
61+
- run: pnpm build
62+
63+
- run: pnpm lint
64+
65+
# - run: pnpm test
66+
67+
- run: pnpm build:storybook
68+
69+
- name: Documentation
70+
if: "env.ENABLE_DOCS == 'true'"
71+
uses: crazy-max/ghaction-github-pages@v2
72+
with:
73+
jekyll: false
74+
target_branch: gh-pages
75+
build_dir: docs
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
79+
- run: echo "env.ENABLE_DOCS is ${{ env.ENABLE_DOCS }}, no documentation can be published" && exit 1
80+
if: "env.ENABLE_DOCS != 'true'"
81+
# regionend

.github/workflows/pull-request.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Pull Request Checks
2+
3+
env:
4+
USE_LOCKFILE: ${{ secrets.USE_LOCKFILE }}
5+
6+
on:
7+
pull_request:
8+
branches: [ master, alpha, beta ]
9+
10+
jobs:
11+
pull-request:
12+
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: ["lts/*", "latest"]
17+
18+
steps:
19+
20+
# region Setup
21+
- uses: actions/checkout@v2
22+
23+
- name: Setting Up Node.js (${{ matrix.node-version }})
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
28+
- uses: pnpm/action-setup@v2.0.1
29+
name: Install pnpm
30+
id: pnpm-install
31+
with:
32+
version: latest
33+
34+
- name: Get Pnpm Cache Path
35+
id: pnpm-cache
36+
run: |
37+
echo "::set-output name=dir::$(pnpm store path)"
38+
39+
- uses: actions/cache@v3
40+
name: pnpm cache
41+
with:
42+
path: ${{ steps.pnpm-cache.outputs.dir }}
43+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+
restore-keys: |
45+
${{ runner.os }}-pnpm-store-
46+
47+
- run: "echo Cache Key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
48+
- run: "echo Cache Restore-Keys: ${{ runner.os }}-pnpm-store-"
49+
- run: "echo Pnpm Cache Hit: ${{ steps.pnpm-cache.outputs.cache-hit }}"
50+
# regionend
51+
52+
# region Steps
53+
- run: pnpm install --frozen-lockfile
54+
if: "env.USE_LOCKFILE == 'true'"
55+
56+
- run: pnpm install --no-lockfile
57+
if: "env.USE_LOCKFILE != 'true'"
58+
59+
- name: Commits to Lint
60+
run: git log ${{github.event.pull_request.base.sha}}..${{github.event.pull_request.head.sha}} --graph --abbrev-commit --decorate --format=format:'%h%d%n%s (%cr) - %an (%ae)%n%b'
61+
62+
- name: Lint Commits
63+
run: yarn commitlint --from ${{github.event.pull_request.base.sha}} --to ${{github.event.pull_request.head.sha}}
64+
65+
- run: pnpm build
66+
67+
- run: pnpm lint
68+
69+
- run: pnpm coverage
70+
71+
- name: Coverage
72+
uses: romeovs/lcov-reporter-action@v0.2.16
73+
with:
74+
github-token: ${{ secrets.GITHUB_TOKEN }}
75+
# regionend

0 commit comments

Comments
 (0)