feat: [OCISDEV-744] core-api-test

This commit is contained in:
Michal Klos committed 2026-03-30 14:10:06 +02:00
1 parent aba9654f87
commit bc74fb9f89
1 file changed
+151 -154
+151 -154
View File
@@ -5,163 +5,167 @@ on:
workflow_dispatch:
jobs:
coding-standard:
name: coding-standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip
tools: composer
- name: PHP code style
run: |
make vendor-bin-codestyle
make vendor-bin-codesniffer
make test-php-style
- name: Check env var annotations
run: make check-env-var-annotations
check-gherkin-standard:
name: check-gherkin-standard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: "24"
- name: Lint feature files
run: |
npm install -g @gherlint/gherlint@1.1.0
make test-gherkin-lint
check-suites-in-expected-failures:
name: check-suites-in-expected-failures
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check suites
run: bash tests/acceptance/check-deleted-suites-in-expected-failure.sh
build-and-test:
name: build-and-test
needs: [coding-standard, check-gherkin-standard, check-suites-in-expected-failures]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- name: Build ocis
run: make -C ocis build
- name: Unit tests
run: make test
local-api-tests:
name: ${{ matrix.suite }}
needs: [build-and-test]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
# contract & locks
- apiContract
- apiLocks
# settings & notifications (needs email)
- apiSettings
- apiNotification
- apiCors
# graph
- apiGraphUser
- apiGraph
- apiGraphGroup
# spaces & dav
- apiSpaces
- apiSpacesShares
- apiSpacesDavOperation
- apiDownloads
- apiAsyncUpload
- apiDepthInfinity
- apiArchiver
- apiActivities
# search
- apiSearch1
# - apiSearch2
- apiSearchContent # needs Tika
# sharing
- apiSharingNgShares
- apiReshare
- apiSharingNgPermissions
- apiSharingNgAdditionalShareRole
- apiSharingNgDriveInvitation
- apiSharingNgItemInvitation
- apiSharingNgDriveLinkShare
- apiSharingNgItemLinkShare
- apiSharingNgLinkShareManagement
# auth
- apiAuthApp
# antivirus (needs ClamAV)
- apiAntivirus
# federation (needs email + federation ocis)
# - apiOcm
# collaboration (needs WOPI)
# - apiCollaboration
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
cache: true
- name: Install libcurl 8.12.0 from source
run: |
sudo apt-get update -qq
sudo apt-get install -y libssl-dev libnghttp2-dev libpsl-dev libldap-dev libssh-dev zlib1g-dev libvips-dev
cd /tmp
curl -sLO https://curl.se/download/curl-8.12.0.tar.gz
tar xzf curl-8.12.0.tar.gz
cd curl-8.12.0
./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/usr/local --enable-versioned-symbols --silent
make -j$(nproc) --silent
sudo make install --silent
sudo ldconfig
curl --version | head -1
php -r '
$v = curl_version()["version"];
echo "PHP curl: $v\n";
if (version_compare($v, "8.12.0", "<")) {
fwrite(STDERR, "FATAL: PHP sees libcurl $v, need >= 8.12.0\n");
exit(1);
}
'
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
with:
php-version: "8.4"
extensions: curl, xml, mbstring, zip
tools: composer
- name: Run ${{ matrix.suite }}
run: BEHAT_SUITES=${{ matrix.suite }} python3 tests/acceptance/run-github.py
# coding-standard:
# name: coding-standard
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
# with:
# php-version: "8.4"
# extensions: curl, xml, mbstring, zip
# tools: composer
# - name: PHP code style
# run: |
# make vendor-bin-codestyle
# make vendor-bin-codesniffer
# make test-php-style
# - name: Check env var annotations
# run: make check-env-var-annotations
#
# check-gherkin-standard:
# name: check-gherkin-standard
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
# with:
# node-version: "24"
# - name: Lint feature files
# run: |
# npm install -g @gherlint/gherlint@1.1.0
# make test-gherkin-lint
#
# check-suites-in-expected-failures:
# name: check-suites-in-expected-failures
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - name: Check suites
# run: bash tests/acceptance/check-deleted-suites-in-expected-failure.sh
#
# build-and-test:
# name: build-and-test
# needs: [coding-standard, check-gherkin-standard, check-suites-in-expected-failures]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
# with:
# go-version-file: go.mod
# cache: true
#
# - name: Build ocis
# run: make -C ocis build
#
# - name: Unit tests
# run: make test
#
# local-api-tests:
# name: ${{ matrix.suite }}
# needs: [build-and-test]
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# suite:
# # contract & locks
# - apiContract
# - apiLocks
# # settings & notifications (needs email)
# - apiSettings
# - apiNotification
# - apiCors
# # graph
# - apiGraphUser
# - apiGraph
# - apiGraphGroup
# # spaces & dav
# - apiSpaces
# - apiSpacesShares
# - apiSpacesDavOperation
# - apiDownloads
# - apiAsyncUpload
# - apiDepthInfinity
# - apiArchiver
# - apiActivities
# # search
# - apiSearch1
# # - apiSearch2
# - apiSearchContent # needs Tika
# # sharing
# - apiSharingNgShares
# - apiReshare
# - apiSharingNgPermissions
# - apiSharingNgAdditionalShareRole
# - apiSharingNgDriveInvitation
# - apiSharingNgItemInvitation
# - apiSharingNgDriveLinkShare
# - apiSharingNgItemLinkShare
# - apiSharingNgLinkShareManagement
# # auth
# - apiAuthApp
# # antivirus (needs ClamAV)
# - apiAntivirus
# # federation (needs email + federation ocis)
# # - apiOcm
# # collaboration (needs WOPI)
# # - apiCollaboration
# steps:
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
#
# - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
# with:
# go-version-file: go.mod
# cache: true
#
# - name: Install libcurl 8.12.0 from source
# run: |
# sudo apt-get update -qq
# sudo apt-get install -y libssl-dev libnghttp2-dev libpsl-dev libldap-dev libssh-dev zlib1g-dev libvips-dev
# cd /tmp
# curl -sLO https://curl.se/download/curl-8.12.0.tar.gz
# tar xzf curl-8.12.0.tar.gz
# cd curl-8.12.0
# ./configure --with-ssl --with-zlib --with-nghttp2 --prefix=/usr/local --enable-versioned-symbols --silent
# make -j$(nproc) --silent
# sudo make install --silent
# sudo ldconfig
# curl --version | head -1
# php -r '
# $v = curl_version()["version"];
# echo "PHP curl: $v\n";
# if (version_compare($v, "8.12.0", "<")) {
# fwrite(STDERR, "FATAL: PHP sees libcurl $v, need >= 8.12.0\n");
# exit(1);
# }
# '
#
# - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
# with:
# php-version: "8.4"
# extensions: curl, xml, mbstring, zip
# tools: composer
#
# - name: Run ${{ matrix.suite }}
# run: BEHAT_SUITES=${{ matrix.suite }} python3 tests/acceptance/run-github.py
#
core-api-tests:
name: ${{ matrix.suite }}
needs: [build-and-test]
needs: []
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite:
- "coreApiAuth,coreApiCapabilities,coreApiFavorites,coreApiMain,coreApiVersions"
- "coreApiShareManagementBasicToShares,coreApiShareManagementToShares"
- "coreApiSharees,coreApiSharePublicLink2"
- "coreApiShareOperationsToShares1,coreApiShareOperationsToShares2,coreApiSharePublicLink1,coreApiShareCreateSpecialToShares1,coreApiShareCreateSpecialToShares2,coreApiShareUpdateToShares"
- "coreApiTrashbin,coreApiTrashbinRestore,coreApiWebdavEtagPropagation1,coreApiWebdavEtagPropagation2"
- "coreApiWebdavDelete,coreApiWebdavOperations,coreApiWebdavMove2"
- "coreApiWebdavProperties"
- "coreApiWebdavMove1,coreApiWebdavPreviews,coreApiWebdavUpload,coreApiWebdavUploadTUS"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
@@ -204,15 +208,8 @@ jobs:
EXPECTED_FAILURES_FILE=tests/acceptance/expected-failures-API-on-OCIS-storage.md
python3 tests/acceptance/run-github.py
- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.suite }}
path: tests/acceptance/output/
all-acceptance-tests:
needs: [local-api-tests, core-api-tests]
needs: [core-api-tests]
runs-on: ubuntu-latest
if: always()
steps: