Repository navigation
62 lines (54 loc) · 1.9 KB
/
Copy pathtest-lightning-branch.yml
File metadata and controls
62 lines (54 loc) · 1.9 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
name: Test against a Lightning branch
# Runs the contract suite on a GitHub runner against any Lightning ref and any
# worker, via the composite action in ./action.yml — the same action Lightning
# and kit call from their own CI. This workflow is therefore also the test of
# that action.
#
# The toolchain is *not* pinned here: Erlang/Elixir/node come from the
# checkout's own .tool-versions, so a Lightning bump can't silently break this.
run-name: >-
${{ inputs.lightning_repo || 'OpenFn/lightning' }}@${{ inputs.lightning_ref || 'main' }}
vs worker ${{ inputs.worker || 'latest' }}
on:
workflow_dispatch:
inputs:
lightning_ref:
description: "Lightning branch, tag, or SHA to test"
required: true
default: main
lightning_repo:
description: "Lightning repo (owner/name) — change for a fork"
required: false
default: OpenFn/lightning
worker:
description: "Worker spec: npm version (latest, 1.14.1), kit ref, or owner/repo#ref"
required: false
default: latest
concurrency:
group: contract-${{ inputs.lightning_repo }}-${{ inputs.lightning_ref }}-${{ inputs.worker }}
cancel-in-progress: true
jobs:
contract:
name: Boot Lightning + worker, run the contract suite
runs-on: ubuntu-latest
timeout-minutes: 45
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 3s
--health-retries 20
steps:
- uses: actions/checkout@v7
- name: Run integration tests
uses: ./
with:
lightning: ${{ inputs.lightning_repo || 'OpenFn/lightning' }}#${{ inputs.lightning_ref || 'main' }}
worker: ${{ inputs.worker || 'latest' }}