Repository navigation
62 lines (57 loc) · 2.16 KB
/
Copy pathci.yml
File metadata and controls
62 lines (57 loc) · 2.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Every pull request, and the release before it stages anything (release.yml
# calls this workflow): format (Oxfmt), lint (Oxlint), type-check, the unit
# tests and the plugin SDK's contract test kit (checkAuthMethod), the build
# and the tarball's file list; then the end-to-end suite (e2e/run.sh), which
# runs the released QAuth server image with this plugin installed on top,
# against a mock GitHub. pnpm's version is package.json's packageManager.
name: ci
on:
pull_request:
push:
branches: [main]
workflow_call:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
# The Node QAuth's server image runs, and the plugin with it.
node-version: 26
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run format:check
- run: pnpm run lint
- run: pnpm run typecheck
- name: Unit tests and the SDK's contract test kit (checkAuthMethod)
run: pnpm test
- run: pnpm run build
- name: The files npm would receive
run: |
set -euo pipefail
pnpm pack --pack-destination "$RUNNER_TEMP/pack"
tar -tzf "$RUNNER_TEMP"/pack/*.tgz
e2e:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 26
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: The released server image plus the plugin, against a mock GitHub
run: bash e2e/run.sh