Skip to content

Commit 71de110

Browse files
author
LamNguyen176
committed
change job
1 parent 0d02d71 commit 71de110

File tree

2 files changed

+71
-42
lines changed

2 files changed

+71
-42
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
node-version-file: .nvmrc
1111

1212
- name: Cache Yarn dependencies
13-
uses: actions/cache@v2
13+
uses: actions/cache@v3
1414
with:
1515
path: |
1616
**/node_modules
@@ -19,23 +19,6 @@ runs:
1919
restore-keys: |
2020
${{ runner.os }}-yarn-
2121
22-
# - name: Cache dependencies
23-
# id: yarn-cache
24-
# uses: actions/cache@v3
25-
# with:
26-
# path: |
27-
# **/node_modules
28-
# .yarn/install-state.gz
29-
# key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
30-
# restore-keys: |
31-
# ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
32-
# ${{ runner.os }}-yarn-
33-
#
34-
# - name: Install dependencies
35-
# if: steps.yarn-cache.outputs.cache-hit != 'true'
36-
# run: yarn install
37-
# shell: bash
38-
3922
- name: Install dependencies
4023
run: yarn install
4124
shell: bash

.github/workflows/ci.yml

Lines changed: 70 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- checks_requested
1212

1313
jobs:
14-
lint:
14+
setup:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
@@ -20,38 +20,84 @@ jobs:
2020
- name: Setup
2121
uses: ./.github/actions/setup
2222

23-
# - name: Set up Node.js
24-
# uses: actions/setup-node@v3
25-
# with:
26-
# node-version-file: .nvmrc
27-
#
28-
# - name: Install Yarn
29-
# run: |
30-
# curl -o- -L https://yarnpkg.com/install.sh | bash
31-
## export PATH="$HOME/.yarn/bin:$PATH"
32-
#
33-
# - name: Check for yarn.lock
34-
# run: |
35-
# if [ ! -f yarn.lock ]; then
36-
# echo "yarn.lock file is missing. Please run 'yarn install' to generate one."
37-
# exit 1
38-
# fi
39-
#
40-
# - name: Install dependencies
41-
# run: yarn install
23+
lint:
24+
runs-on: ubuntu-latest
25+
needs: setup
26+
steps:
27+
- name: Checkout Code
28+
uses: actions/checkout@v3
4229

43-
- name: Lint files
30+
- name: Run Lint
4431
run: yarn lint
4532

46-
- name: Typecheck files
33+
typecheck:
34+
runs-on: ubuntu-latest
35+
needs: setup
36+
steps:
37+
- name: Checkout Code
38+
uses: actions/checkout@v3
39+
40+
- name: Run Type Check
4741
run: yarn typecheck
4842

49-
- name: Run unit tests
43+
test:
44+
runs-on: ubuntu-latest
45+
needs: [lint, typecheck]
46+
steps:
47+
- name: Checkout Code
48+
uses: actions/checkout@v3
49+
50+
- name: Run Tests
5051
run: yarn test --maxWorkers=2 --coverage
5152

52-
- name: Upload coverage to Codecov
53+
upload-coverage:
54+
runs-on: ubuntu-latest
55+
needs: test
56+
steps:
57+
- name: Upload Coverage to Codecov
5358
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.COVERAGE_KEY }} -f coverage/lcov.info
5459

60+
# lint1:
61+
# runs-on: ubuntu-latest
62+
# steps:
63+
# - name: Checkout
64+
# uses: actions/checkout@v3
65+
#
66+
# - name: Setup
67+
# uses: ./.github/actions/setup
68+
#
69+
## - name: Set up Node.js
70+
## uses: actions/setup-node@v3
71+
## with:
72+
## node-version-file: .nvmrc
73+
##
74+
## - name: Install Yarn
75+
## run: |
76+
## curl -o- -L https://yarnpkg.com/install.sh | bash
77+
### export PATH="$HOME/.yarn/bin:$PATH"
78+
##
79+
## - name: Check for yarn.lock
80+
## run: |
81+
## if [ ! -f yarn.lock ]; then
82+
## echo "yarn.lock file is missing. Please run 'yarn install' to generate one."
83+
## exit 1
84+
## fi
85+
##
86+
## - name: Install dependencies
87+
## run: yarn install
88+
#
89+
# - name: Lint files
90+
# run: yarn lint
91+
#
92+
# - name: Typecheck files
93+
# run: yarn typecheck
94+
#
95+
# - name: Run unit tests
96+
# run: yarn test --maxWorkers=2 --coverage
97+
#
98+
# - name: Upload coverage to Codecov
99+
# run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.COVERAGE_KEY }} -f coverage/lcov.info
100+
55101
# build-library:
56102
# runs-on: ubuntu-latest
57103
# steps:

0 commit comments

Comments
 (0)