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
# Integration tests against a DEPLOYED service.
#
# Deliberately NOT on push: these run against a deployment, which is shared,
# can lag `main`, and is not something a pull request should be allowed to
# create state on without someone asking for it. Run it by hand, or let the
# schedule catch a deployment that has drifted from the contract.
#
# The base URL is a repository VARIABLE (`OCS_INTEGRATION_BASE_URL`) rather
# than anything committed here: where the service is deployed is an operator's
# configuration. With the variable unset the job still runs and every test
# skips, which is a useful signal in itself.
name: Integration (deployed service)
on:
workflow_dispatch:
inputs:
base_url:
description: "Base URL of the service to test, e.g. http://host:7070. Defaults to the OCS_INTEGRATION_BASE_URL repository variable."
required: false
type: string
schedule:
# 06:00 UTC on Mondays: early enough to find a drifted deployment before
# the week's work depends on it.
- cron: "0 6 * * 1"
jobs:
integration:
name: Integration (deployed service)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run the integration suite
run: cargo test -p examples_integration -- --nocapture
env:
LOGLEVEL: WARN
OCS_INTEGRATION_BASE_URL: ${{ inputs.base_url || vars.OCS_INTEGRATION_BASE_URL }}