-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (88 loc) · 2.51 KB
/
main.yml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: "Main"
on:
push:
branches:
- main
pull_request:
env:
ECHOSERVER_VERSION: 0.2.0
jobs:
prepare_checks:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v4
with:
target: default
files: docker-bake.hcl
run_check:
runs-on: ubuntu-latest
needs:
- prepare_checks
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.prepare_checks.outputs.targets) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check
uses: docker/bake-action@v5
with:
targets: ${{ matrix.target }}
files: docker-bake.hcl
prepare_integration_checks:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.generate.outputs.targets }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: List targets
id: generate
uses: docker/bake-action/subaction/list-targets@v4
with:
target: dev
files: docker-bake.hcl
run_integration_check:
runs-on: ubuntu-latest
needs:
- prepare_integration_checks
strategy:
fail-fast: false
matrix:
target:
${{ fromJson(needs.prepare_integration_checks.outputs.targets) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build dev environment image
id: dev_image
uses: docker/bake-action@v5
with:
targets: ${{ matrix.target }}
files: docker-bake.hcl
push: false
load: true
- name: Run integration test
env:
BAKE_META: ${{ steps.dev_image.outputs.metadata }}
DEV_IMAGE_TARGET: ${{ matrix.target }}
run: |
set -x
# Find the image name built by the preceding step for the Python
# version being tested.
V8SERIALIZE_DEV_IMAGE=$(jq <<<"${BAKE_META:?}" -re \
'.[$ENV.DEV_IMAGE_TARGET]["image.name"] | split(",") | first'
)
# Start the V8 echoservers that the integration test communicates with
docker compose up -d
# Discover the running echoservers
V8SERIALIZE_ECHOSERVERS=$(./scripts/list-echoservers.sh)
export V8SERIALIZE_DEV_IMAGE V8SERIALIZE_ECHOSERVERS
docker compose run integration_test