forked from cs3org/reva
-
Notifications
You must be signed in to change notification settings - Fork 7
164 lines (152 loc) · 5.74 KB
/
Copy pathci.yml
File metadata and controls
164 lines (152 loc) · 5.74 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CI
on:
push:
branches: [main]
pull_request:
# Jobs that need Docker (litmus, cs3api, acceptance) run on bare ubuntu with setup-go.
# Container jobs can't run `docker run` — no Docker-in-Docker in GHA.
# https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container#about-container-jobs
jobs:
check-go-generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: make go-generate && git diff --exit-code
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: sudo apt-get update && sudo apt-get install -y inotify-tools
- run: make test
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: coverage
path: coverage.out
build:
needs: [unit-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: make dist
integration-tests:
needs: [unit-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: docker run -d --name redis --network host -e REDIS_DATABASES=1 redis:6-alpine
- run: make test-integration
env:
REDIS_ADDRESS: localhost:6379
litmus:
needs: [unit-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
endpoint: [old-webdav, new-webdav, spaces-dav]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: python3 tests/acceptance/run-litmus.py --endpoint ${{ matrix.endpoint }}
cs3api-validator:
needs: [unit-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
storage: [ocis] # TODO: s3ng blocked on Ceph networking — follow-up PR
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- run: python3 tests/acceptance/run-cs3api.py --storage ${{ matrix.storage }}
acceptance-tests-ocis:
needs: [unit-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
with:
php-version: "8.4"
- run: python3 tests/acceptance/run-acceptance.py --storage ocis --total-parts 4 --run-part ${{ matrix.part }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: acceptance-ocis-part-${{ matrix.part }}
path: tmp/testrunner/tests/acceptance/output/
# TODO: acceptance-tests-s3ng skipped — blocked on Ceph networking — follow-up PR
acceptance-tests-posixfs:
needs: [unit-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2
with:
php-version: "8.4"
- run: sudo apt-get update && sudo apt-get install -y inotify-tools
- run: python3 tests/acceptance/run-acceptance.py --storage posixfs --total-parts 4 --run-part ${{ matrix.part }}
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: acceptance-posixfs-part-${{ matrix.part }}
path: tmp/testrunner/tests/acceptance/output/
ci-ok:
if: always()
needs:
- check-go-generate
- unit-tests
- build
- integration-tests
- litmus
- cs3api-validator
- acceptance-tests-ocis
- acceptance-tests-posixfs
runs-on: ubuntu-latest
steps:
- run: |
results=(
"${{ needs.check-go-generate.result }}"
"${{ needs.unit-tests.result }}"
"${{ needs.build.result }}"
"${{ needs.integration-tests.result }}"
"${{ needs.litmus.result }}"
"${{ needs.cs3api-validator.result }}"
"${{ needs.acceptance-tests-ocis.result }}"
"${{ needs.acceptance-tests-posixfs.result }}"
)
for r in "${results[@]}"; do
if [[ "$r" != "success" && "$r" != "skipped" ]]; then
echo "FAILED: $r"
exit 1
fi
done