Skip to content

Commit 8e970f9

Browse files
committed
Add github actions workflow
1 parent 5b5cc03 commit 8e970f9

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
push:
3+
branches: [ "*" ]
4+
pull_request:
5+
6+
jobs:
7+
test:
8+
strategy:
9+
matrix:
10+
node-version: ['latest', 'lts/iron']
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: Enable corepack
20+
run: corepack enable
21+
- name: Get yarn cache directory path
22+
id: yarn-cache-dir-path
23+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
24+
- uses: actions/cache@v3
25+
id: yarn-cache
26+
with:
27+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
28+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-yarn-
31+
- name: Install packages
32+
run: yarn install --immutable
33+
- name: Build with astro
34+
run: yarn build

0 commit comments

Comments
 (0)