-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (34 loc) · 1.16 KB
/
Copy pathe2e.yml
File metadata and controls
41 lines (34 loc) · 1.16 KB
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
# Optional live API checks. Add repository secret HACKMD_E2E_ACCESS_TOKEN.
# Optionally add HACKMD_E2E_API_ENDPOINT (e.g. https://api-stage.hackmd.io/v1); otherwise production is used.
name: E2E (live HackMD API)
on:
workflow_dispatch:
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 10.33.2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"
cache-dependency-path: nodejs/pnpm-lock.yaml
- name: Install dependencies
working-directory: nodejs
run: pnpm install --frozen-lockfile
- name: Run e2e tests
working-directory: nodejs
env:
HACKMD_ACCESS_TOKEN: ${{ secrets.HACKMD_E2E_ACCESS_TOKEN }}
HACKMD_API_ENDPOINT: ${{ secrets.HACKMD_E2E_API_ENDPOINT }}
run: |
if [ -z "${HACKMD_ACCESS_TOKEN:-}" ]; then
echo "::error::Add repository secret HACKMD_E2E_ACCESS_TOKEN (a valid API token for the target environment)."
exit 1
fi
pnpm test:e2e