-
Notifications
You must be signed in to change notification settings - Fork 616
69 lines (65 loc) · 1.44 KB
/
ci.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
name: ci
on:
push:
branches:
- master
- main
pull_request:
env:
DOCKER_SWARMKIT_USE_CONTAINER: 1
IMAGE_NAME: moby/swarmkit
jobs:
build-dev:
runs-on: ubuntu-22.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build dev image
uses: docker/bake-action@v2
with:
targets: dev
set: |
*.cache-from=type=gha,scope=dev${{ matrix.mode }}
*.cache-to=type=gha,scope=dev${{ matrix.mode }},mode=max
*.output=type=cacheonly
test:
runs-on: ubuntu-22.04
needs:
- build-dev
strategy:
fail-fast: false
matrix:
target:
- coverage
- coverage-integration
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build dev image
uses: docker/bake-action@v2
with:
targets: dev
set: |
*.cache-from=type=gha,scope=dev
-
name: Test
run: |
make IMAGE_NAME=$IMAGE_NAME ${{ matrix.target }}
-
name: Send to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: RUNNER_OS
flags: ${{ matrix.target }}