Skip to content

Commit c66b363

Browse files
committed
feat: ci/cd
- updated ci checks
1 parent 68e1b03 commit c66b363

File tree

7 files changed

+10006
-7
lines changed

7 files changed

+10006
-7
lines changed

.github/actions/setup/action.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Setup
2+
description: Install dependencies
3+
4+
runs:
5+
using: 'composite'
6+
steps:
7+
- name: Check out code
8+
uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
12+
- name: Setup node
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
17+
- name: Download yarn cache
18+
uses: actions/cache@v3
19+
id: yarn-cache
20+
with:
21+
path: |
22+
node_modules
23+
~/.cache/Cypress
24+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-modules-
27+
28+
- name: Install Dependencies
29+
if: steps.yarn-cache.outputs.cache-hit != 'true'
30+
run: yarn install --frozen-lockfile
31+
shell: bash

.github/workflows/main.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
yarn:
13+
uses: ./.github/workflows/yarn-cache.yml
14+
15+
test:
16+
needs: yarn
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: ./.github/actions/setup
21+
22+
- run: yarn test
23+
24+
lint:
25+
needs: yarn
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: ./.github/actions/setup
30+
31+
- run: yarn lint
32+
33+
build:
34+
needs: yarn
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: ./.github/actions/setup
39+
40+
- run: yarn prod:build

.github/workflows/yarn-cache.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Cache Dependencies
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
setup:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out code
11+
uses: actions/checkout@v4
12+
13+
- name: Setup node
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
18+
- name: Check yarn cache
19+
uses: actions/cache@v3
20+
id: yarn-cache-check
21+
with:
22+
path: |
23+
node_modules
24+
~/.cache/Cypress
25+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
26+
lookup-only: true
27+
28+
- name: Prepare yarn cache
29+
uses: actions/cache@v3
30+
if: steps.yarn-cache-check.outputs.cache-hit != 'true'
31+
with:
32+
path: |
33+
node_modules
34+
~/.cache/Cypress
35+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
38+
39+
- name: Install Dependencies
40+
if: steps.yarn-cache-check.outputs.cache-hit != 'true'
41+
run: yarn install --frozen-lockfile

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ dist
44
certs
55
coverage
66
node_modules
7-
yarn.lock
8-
bun.lockb
97

108
.env
119
.DS_Store

.stylelintrc

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"syntax": "postcss-scss",
33
"plugins": ["stylelint-order"],
4-
"extends": [
5-
"stylelint-config-standard-scss",
6-
"stylelint-config-prettier"
7-
],
4+
"extends": ["stylelint-config-standard-scss"],
85
"rules": {}
96
}

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
"sass-loader": "^14.2.1",
114114
"serve-favicon": "^2.5.0",
115115
"stylelint": "^16.6.1",
116-
"stylelint-config-prettier": "^9.0.5",
117116
"stylelint-config-standard-scss": "^13.1.0",
118117
"stylelint-order": "^6.0.4",
119118
"ts-jest": "^29.1.5",

0 commit comments

Comments
 (0)