Skip to content

Commit c554bf7

Browse files
build(sb): 👷 update actions, sb & vscode configs (#388)
2 parents 6b7bf37 + 32d78b6 commit c554bf7

File tree

15 files changed

+341
-299
lines changed

15 files changed

+341
-299
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/lint.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
install:
13+
name: Install node_modules
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version-file: .nvmrc
24+
25+
- name: Cache node_modules
26+
uses: actions/cache@v3
27+
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
28+
with:
29+
path: node_modules
30+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-yarn-
33+
34+
- name: Install Dependencies
35+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
36+
run: yarn --frozen-lockfile
37+
38+
lint:
39+
name: Lint
40+
needs: install
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v3
46+
47+
- name: Set up Node
48+
uses: actions/setup-node@v3
49+
with:
50+
node-version-file: .nvmrc
51+
52+
- name: Cache node_modules
53+
uses: actions/cache@v3
54+
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
55+
with:
56+
path: node_modules
57+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
58+
restore-keys: |
59+
${{ runner.os }}-yarn-
60+
61+
- name: Install Dependencies
62+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
63+
run: yarn --frozen-lockfile
64+
65+
- name: Lint
66+
run: yarn lint
67+
68+
build:
69+
name: Build
70+
needs: install
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- name: Checkout repository
75+
uses: actions/checkout@v3
76+
77+
- name: Set up Node
78+
uses: actions/setup-node@v3
79+
with:
80+
node-version-file: .nvmrc
81+
82+
- name: Cache node_modules
83+
uses: actions/cache@v3
84+
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
85+
with:
86+
path: node_modules
87+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
88+
restore-keys: |
89+
${{ runner.os }}-yarn-
90+
91+
- name: Install Dependencies
92+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
93+
run: yarn --frozen-lockfile
94+
95+
- name: Build
96+
run: yarn build
97+
98+
test:
99+
name: Test
100+
needs: install
101+
runs-on: ubuntu-latest
102+
103+
steps:
104+
- name: Checkout repository
105+
uses: actions/checkout@v3
106+
107+
- name: Set up Node
108+
uses: actions/setup-node@v3
109+
with:
110+
node-version-file: .nvmrc
111+
112+
- name: Cache node_modules
113+
uses: actions/cache@v3
114+
id: cache-node-modules # use this to check for `cache-hit` (`steps.cache-node-modules.outputs.cache-hit != 'true'`)
115+
with:
116+
path: node_modules
117+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
118+
restore-keys: |
119+
${{ runner.os }}-yarn-
120+
121+
- name: Install Dependencies
122+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
123+
run: yarn --frozen-lockfile
124+
125+
- name: Test
126+
run: yarn test

.github/workflows/test.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.nvmrc

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

.storybook/adaptui.svg

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
module.exports = {
1+
const config = {
22
framework: "@storybook/react",
33
core: { builder: "webpack5" },
44
// storyStoreV7 removes the circular dependency issue with Webpack 5
55
// So, we added ThemeProvider in preview.jsx and so src/theme should work for HMR
66
features: { storyStoreV7: true, babelModeV7: true },
7-
stories: ["../src/**/*.stories.@(js|jsx|ts|tsx)"],
7+
stories: ["../src/*/stories/*.stories.@(ts|tsx)"],
88
addons: [
99
"storybook-addon-preview",
1010
"@storybook/addon-essentials",
@@ -18,4 +18,7 @@ module.exports = {
1818
},
1919
},
2020
],
21+
staticDirs: ["../assets"],
2122
};
23+
24+
module.exports = config;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const parameters = {
1111
};
1212

1313
export const decorators = [
14-
(Story, context) => {
14+
(Story: any, context: any) => {
1515
document.body.id = kebabCase(context.kind);
1616
document.body.classList.add("font-sans");
1717
document.body.classList.add("antialiased");

.storybook/storybookTheme.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)