-
Notifications
You must be signed in to change notification settings - Fork 196
72 lines (59 loc) · 1.56 KB
/
build.yaml
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
name: "Build and Test"
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'deploy/**'
- 'examples/**'
- '*.md'
jobs:
test:
name: "lint and test"
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: lint and test
shell: sh
run: |
make lint
make test-coverage
- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: ".cover/tests.xml"
- name: upload coverage
uses: codecov/codecov-action@v3
with:
files: ".cover/coverage.xml"
integration:
name: "integration tests"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: build image
uses: docker/build-push-action@v3
with:
build-args: SKIP_TESTS=true
file: docker/Dockerfile
context: .
tags: pumba:test
target: integration-tests
outputs: type=docker,dest=/tmp/image.tar
- name: integration tests
run: |
docker load -i /tmp/image.tar
docker run -i --rm --name integration-tests -v /var/run/docker.sock:/var/run/docker.sock pumba:test