Skip to content

Commit 66be71d

Browse files
committed
Reorder CI jobs and improve pnpm setup
1 parent cafe9b9 commit 66be71d

File tree

2 files changed

+25
-36
lines changed

2 files changed

+25
-36
lines changed

.github/actions/pnpm/action.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ runs:
1919
id: pnpm-cache
2020
shell: bash
2121
run: |
22-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
22+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
2323
2424
- name: Setup pnpm cache
2525
uses: actions/cache@v3
2626
with:
27-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
27+
path: ${{ env.STORE_PATH }}
2828
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
2929
restore-keys: |
3030
${{ runner.os }}-pnpm-store-
3131
3232
- name: Install packages
33-
shell: 'bash'
33+
shell: bash
3434
run: pnpm install

.github/workflows/ci.yml

+22-33
Original file line numberDiff line numberDiff line change
@@ -9,84 +9,73 @@ jobs:
99
install:
1010
name: Install packages
1111
runs-on: ubuntu-latest
12-
1312
steps:
1413
- name: Checkout
1514
uses: actions/checkout@v3
1615
- name: Setup pnpm
1716
uses: ./.github/actions/pnpm
1817

19-
lint_website:
20-
name: Run ESLint in website
18+
library_prettier:
19+
name: Run Prettier in library
2120
needs: install
2221
runs-on: ubuntu-latest
23-
2422
steps:
2523
- name: Checkout
2624
uses: actions/checkout@v3
2725
- name: Setup pnpm
2826
uses: ./.github/actions/pnpm
27+
- name: Prettier check
28+
run: pnpm format.check
29+
working-directory: library
2930

30-
- name: ESLint check
31-
run: pnpm lint
32-
working-directory: website
33-
34-
format_website:
35-
name: Run Prettier in website
31+
library_eslint:
32+
name: Run ESLint in library
3633
needs: install
3734
runs-on: ubuntu-latest
38-
3935
steps:
4036
- name: Checkout
4137
uses: actions/checkout@v3
4238
- name: Setup pnpm
4339
uses: ./.github/actions/pnpm
40+
- name: ESLint check
41+
run: pnpm lint
42+
working-directory: library
4443

45-
- name: Prettier check
46-
run: pnpm format.check
47-
working-directory: website
48-
49-
lint_library:
50-
name: Run ESLint in library
44+
library_vitest:
45+
name: Run Vitest in library
5146
needs: install
5247
runs-on: ubuntu-latest
53-
5448
steps:
5549
- name: Checkout
5650
uses: actions/checkout@v3
5751
- name: Setup pnpm
5852
uses: ./.github/actions/pnpm
59-
60-
- name: ESLint check
61-
run: pnpm lint
53+
- name: Vitest tests
54+
run: pnpm test
6255
working-directory: library
6356

64-
format_library:
65-
name: Run Prettier in library
57+
website_prettier:
58+
name: Run Prettier in website
6659
needs: install
6760
runs-on: ubuntu-latest
68-
6961
steps:
7062
- name: Checkout
7163
uses: actions/checkout@v3
7264
- name: Setup pnpm
7365
uses: ./.github/actions/pnpm
74-
7566
- name: Prettier check
7667
run: pnpm format.check
77-
working-directory: library
68+
working-directory: website
7869

79-
test_library:
80-
name: Run Vitest in library
70+
website_eslint:
71+
name: Run ESLint in website
8172
needs: install
8273
runs-on: ubuntu-latest
83-
8474
steps:
8575
- name: Checkout
8676
uses: actions/checkout@v3
8777
- name: Setup pnpm
8878
uses: ./.github/actions/pnpm
89-
90-
- name: Vitest tests
91-
run: pnpm test
92-
working-directory: library
79+
- name: ESLint check
80+
run: pnpm lint
81+
working-directory: website

0 commit comments

Comments
 (0)