Skip to content

Commit 881a6b3

Browse files
committed
chore(actions): add test step
1 parent 3a1b6c5 commit 881a6b3

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,47 @@ jobs:
8484
- name: Check types
8585
run: pnpm tsc
8686

87+
test:
88+
name: Test
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: Checkout
92+
uses: actions/checkout@v3
93+
94+
- name: Setup Node
95+
uses: actions/setup-node@v3
96+
with:
97+
node-version: 18
98+
99+
- uses: pnpm/action-setup@v2
100+
name: Install pnpm
101+
with:
102+
version: 7
103+
run_install: false
104+
105+
- name: Get pnpm store directory
106+
id: pnpm-cache
107+
shell: bash
108+
run: |
109+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
110+
111+
- uses: actions/cache@v3
112+
name: Setup pnpm cache
113+
with:
114+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
115+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
116+
restore-keys: |
117+
${{ runner.os }}-pnpm-store-
118+
119+
- name: Install dependencies
120+
run: pnpm install --frozen-lockfile
121+
122+
- name: Check types
123+
run: pnpm test
124+
87125
build:
88126
name: Build on Node ${{ matrix.node }} on ${{ matrix.os }}
127+
needs: [lint, tsc, test]
89128
runs-on: ${{ matrix.os }}
90129
strategy:
91130
matrix:

0 commit comments

Comments
 (0)