-
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 1.08 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: 🔩 Test CI
on:
push:
branches: [ "main" ]
tags-ignore:
- 'v/*'
pull_request:
branches: [ "main" ]
jobs:
test:
name: 🧪 Test
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: 📦 Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: 📦 Install Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: 💽 Setup Enviroment
run: |
cp wrangler.example.toml wrangler.toml
echo "[vars]" >> wrangler.toml
echo "AUTH_SECRET = \"production_value\" " >> wrangler.toml
echo "[[kv_namespaces]]" >> wrangler.toml
echo "binding = \"SHORT_URLS\"" >> wrangler.toml
echo "id = \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"" >> wrangler.toml
env:
AUTH_SECRET: ${{ secrets.AUTH_SECRET }}
KV_NAMESPACE_ID: ${{ secrets.KV_NAMESPACE_ID }}
- name: ⚙️ Install Dependencies
run: pnpm install --frozen-lockfile
- name: 📋 Test
run: pnpm test