Repository navigation
83 lines (78 loc) · 2.64 KB
/
Copy pathci.yml
File metadata and controls
83 lines (78 loc) · 2.64 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: CI
on:
push:
branches: [master, main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
node: [20, 22, 24]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@b0f76dfb45f55f8421693e4803ac7bb65143bd34 # v6
with:
run_install: false
standalone: ${{ matrix.node == 20 }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: ${{ matrix.node }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm check
- name: Verify committed CLI bundle
run: git diff --exit-code -- dist
- name: Smoke test local Action
uses: ./
with:
preview: https://deployproof.loke.dev
production: https://deployproof.loke.dev
routes: |
/
/404.html
timeout: "10000"
strict: true
- name: Reject invalid Action strict input
id: invalid-strict
if: matrix.node == 24
continue-on-error: true
uses: ./
with:
preview: https://deployproof.loke.dev
production: https://deployproof.loke.dev
strict: invalid
- name: Verify invalid Action input failed
if: always() && matrix.node == 24
run: test "${{ steps.invalid-strict.outcome }}" = "failure"
npm-artifact:
name: Node 20 npm artifact
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: 20
package-manager-cache: false
- name: Pack, install, and run published shape
shell: bash
run: |
set -euo pipefail
version="$(node -p "require('./package.json').version")"
tarball="$RUNNER_TEMP/deployproof-${version}.tgz"
npm pack --ignore-scripts --pack-destination "$RUNNER_TEMP"
mkdir "$RUNNER_TEMP/smoke"
cd "$RUNNER_TEMP/smoke"
npm init --yes >/dev/null
npm install --ignore-scripts --no-audit --no-fund "$tarball"
test "$(node -p "Object.keys(require('./node_modules/deployproof/package.json').dependencies || {}).length")" = "0"
test "$(./node_modules/.bin/deployproof --version)" = "$version"