Skip to content

Commit 955f7d1

Browse files
ci(perf): ⚡️ update sb,ci & code config (#328)
2 parents 5f79a75 + e842a35 commit 955f7d1

File tree

15 files changed

+347
-122
lines changed

15 files changed

+347
-122
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
"contributions": [
2828
"code"
2929
]
30+
},
31+
{
32+
"login": "mcnaveen",
33+
"name": "MC Naveen",
34+
"avatar_url": "https://avatars.githubusercontent.com/u/8493007?v=4",
35+
"profile": "https://github.com/mcnaveen",
36+
"contributions": [
37+
"code"
38+
]
3039
}
3140
],
3241
"contributorsPerLine": 7

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

.github/workflows/test.yml

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

.kodiak.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ version = 1
44
[merge]
55
automerge_label = "ready 🎉"
66
require_automerge_label = false
7-
method = "rebase"
87
delete_branch_on_merge = true
98
optimistic_updates = true
109
prioritize_ready_to_merge = true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
const config = {
22
framework: "@storybook/react",
33
core: { builder: "webpack5" },
44
// storyStoreV7 removes the circular dependency issue with Webpack 5
@@ -19,3 +19,5 @@ module.exports = {
1919
},
2020
],
2121
};
22+
23+
module.exports = config;

.storybook/manager-head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<style>
2+
/* Hides showmore example but available via url */
23
#feedback-showmore {
34
display: none !important;
45
}

0 commit comments

Comments
 (0)