-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.82 KB
/
Copy pathci.yml
File metadata and controls
63 lines (54 loc) · 1.82 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
# One run per branch or PR. A superseded run proves nothing about the commit
# that replaced it.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 'lts/*'
cache: npm
- run: npm ci
# An invalid workflow file does not fail loudly — GitHub refuses to
# validate it and simply never runs it, so a broken publish.yml looks
# exactly like a release that published nothing. Checked here because the
# publish workflow, by definition, cannot check itself.
- name: Lint the workflows
uses: docker://rhysd/actionlint:latest
with:
args: -color
- name: Formatting
run: npx prettier --check "src/**/*.ts" "test/**/*.ts" index.ts
- name: Types
run: npm run typecheck
# Excludes test/live, which needs a Hookdeck project and an API key.
- name: Tests
run: npm test
package:
# A plugin that installs without its manifest or an entry file registers
# nothing, and the failure is silent — the host simply never loads it.
# `npm pack` honours the `files` field, so a runtime file nobody listed is
# invisible to every other test here: they all read the source tree, where
# it is present. This boots a real Gateway from the packed tarball instead.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 'lts/*'
cache: npm
- run: npm ci
- name: The packed plugin must load and verify a delivery
run: npm run test:package