Skip to content

Commit 23e10d9

Browse files
committed
feat: [OCISDEV-774] ci, part 1
feat: [OCISDEV-774] ci, part 2 ci: trigger CI feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci feat: [OCISDEV-774] ci
1 parent 823c2f1 commit 23e10d9

4 files changed

Lines changed: 961 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, edge]
6+
pull_request:
7+
8+
env:
9+
GO_VERSION: "1.24"
10+
11+
jobs:
12+
check-go-generate:
13+
runs-on: ubuntu-latest
14+
container: owncloudci/golang:1.24
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
18+
- run: make go-generate && git diff --exit-code
19+
20+
unit-tests:
21+
runs-on: ubuntu-latest
22+
container: owncloudci/golang:1.24
23+
steps:
24+
- uses: actions/checkout@v4
25+
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
26+
- run: apk update && apk add --no-cache inotify-tools
27+
- run: make test
28+
- uses: actions/upload-artifact@v4
29+
if: always()
30+
with:
31+
name: coverage
32+
path: coverage.out
33+
34+
build:
35+
needs: [unit-tests]
36+
runs-on: ubuntu-latest
37+
container: owncloudci/golang:1.24
38+
steps:
39+
- uses: actions/checkout@v4
40+
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
41+
- run: make dist
42+
43+
integration-tests:
44+
needs: [unit-tests]
45+
runs-on: ubuntu-latest
46+
container: owncloudci/golang:1.24
47+
services:
48+
redis:
49+
image: redis:6-alpine
50+
env:
51+
REDIS_DATABASES: 1
52+
steps:
53+
- uses: actions/checkout@v4
54+
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
55+
- run: make test-integration
56+
env:
57+
REDIS_ADDRESS: redis:6379
58+
59+
litmus:
60+
needs: [unit-tests]
61+
runs-on: ubuntu-latest
62+
strategy:
63+
fail-fast: false
64+
matrix:
65+
endpoint: [old-webdav, new-webdav, spaces-dav]
66+
steps:
67+
- uses: actions/checkout@v4
68+
- uses: actions/setup-go@v5
69+
with:
70+
go-version: ${{ env.GO_VERSION }}
71+
- run: python3 tests/acceptance/run-litmus.py --endpoint ${{ matrix.endpoint }}
72+
73+
cs3api-validator:
74+
needs: [unit-tests]
75+
runs-on: ubuntu-latest
76+
strategy:
77+
fail-fast: false
78+
matrix:
79+
storage: [ocis] # TODO: s3ng blocked on Ceph networking — follow-up PR
80+
steps:
81+
- uses: actions/checkout@v4
82+
- uses: actions/setup-go@v5
83+
with:
84+
go-version: ${{ env.GO_VERSION }}
85+
- run: python3 tests/acceptance/run-cs3api.py --storage ${{ matrix.storage }}
86+
87+
acceptance-tests-ocis:
88+
needs: [unit-tests]
89+
runs-on: ubuntu-latest
90+
strategy:
91+
fail-fast: false
92+
matrix:
93+
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
94+
steps:
95+
- uses: actions/checkout@v4
96+
- uses: actions/setup-go@v5
97+
with:
98+
go-version: ${{ env.GO_VERSION }}
99+
- uses: shivammathur/setup-php@v2
100+
with:
101+
php-version: "8.4"
102+
- run: python3 tests/acceptance/run-acceptance.py --storage ocis --total-parts 4 --run-part ${{ matrix.part }}
103+
- uses: actions/upload-artifact@v4
104+
if: failure()
105+
with:
106+
name: acceptance-ocis-part-${{ matrix.part }}
107+
path: tmp/testrunner/tests/acceptance/output/
108+
109+
# TODO: acceptance-tests-s3ng skipped — blocked on Ceph networking — follow-up PR
110+
111+
acceptance-tests-posixfs:
112+
needs: [unit-tests]
113+
runs-on: ubuntu-latest
114+
strategy:
115+
fail-fast: false
116+
matrix:
117+
part: [1, 2] # TODO: parts 3,4 blocked on chunked Transfer-Encoding revad bug — follow-up PR
118+
steps:
119+
- uses: actions/checkout@v4
120+
- uses: actions/setup-go@v5
121+
with:
122+
go-version: ${{ env.GO_VERSION }}
123+
- uses: shivammathur/setup-php@v2
124+
with:
125+
php-version: "8.4"
126+
- run: sudo apt-get update && sudo apt-get install -y inotify-tools
127+
- run: python3 tests/acceptance/run-acceptance.py --storage posixfs --total-parts 4 --run-part ${{ matrix.part }}
128+
- uses: actions/upload-artifact@v4
129+
if: failure()
130+
with:
131+
name: acceptance-posixfs-part-${{ matrix.part }}
132+
path: tmp/testrunner/tests/acceptance/output/
133+
134+
ci-ok:
135+
if: always()
136+
needs:
137+
- check-go-generate
138+
- unit-tests
139+
- build
140+
- integration-tests
141+
- litmus
142+
- cs3api-validator
143+
- acceptance-tests-ocis
144+
- acceptance-tests-posixfs
145+
runs-on: ubuntu-latest
146+
steps:
147+
- run: |
148+
results=(
149+
"${{ needs.check-go-generate.result }}"
150+
"${{ needs.unit-tests.result }}"
151+
"${{ needs.build.result }}"
152+
"${{ needs.integration-tests.result }}"
153+
"${{ needs.litmus.result }}"
154+
"${{ needs.cs3api-validator.result }}"
155+
"${{ needs.acceptance-tests-ocis.result }}"
156+
"${{ needs.acceptance-tests-posixfs.result }}"
157+
)
158+
for r in "${results[@]}"; do
159+
if [[ "$r" != "success" && "$r" != "skipped" ]]; then
160+
echo "FAILED: $r"
161+
exit 1
162+
fi
163+
done

0 commit comments

Comments
 (0)