201 lines
5.7 KiB
YAML
201 lines
5.7 KiB
YAML
name: Acceptance Tests
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
acceptance-tests:
|
|
name: ${{ matrix.suite }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite:
|
|
# graph
|
|
- apiGraph
|
|
- apiGraphGroup
|
|
- apiGraphUser
|
|
# spaces & dav
|
|
- apiSpaces
|
|
- apiSpacesShares
|
|
- apiSpacesDavOperation
|
|
- apiDownloads
|
|
- apiAsyncUpload
|
|
- apiDepthInfinity
|
|
- apiArchiver
|
|
- apiActivities
|
|
# search
|
|
- apiSearch1
|
|
- apiSearch2
|
|
# contract & locks
|
|
- apiContract
|
|
- apiLocks
|
|
# sharing
|
|
- apiSharingNgItemInvitation
|
|
- apiSharingNgPermissions
|
|
- apiSharingNgShares
|
|
- apiSharingNgAdditionalShareRole
|
|
- apiSharingNgDriveInvitation
|
|
- apiSharingNgItemLinkShare
|
|
- apiSharingNgDriveLinkShare
|
|
- apiSharingNgLinkShareManagement
|
|
# auth
|
|
- apiAuthApp
|
|
# settings & notifications (needs email)
|
|
- apiSettings
|
|
- apiNotification
|
|
# antivirus (needs ClamAV)
|
|
- apiAntivirus
|
|
# federation (needs email + federation ocis)
|
|
- apiOcm
|
|
# collaboration (needs WOPI)
|
|
- apiCollaboration
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
extensions: curl, xml, mbstring, zip
|
|
tools: composer
|
|
|
|
- name: Run ${{ matrix.suite }}
|
|
run: BEHAT_SUITES=${{ matrix.suite }} bash tests/acceptance/run-github.sh
|
|
|
|
- name: Upload test logs
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: test-logs-${{ matrix.suite }}
|
|
path: tests/acceptance/output/
|
|
|
|
local-api-tests-tika:
|
|
name: apiSearchContent
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
tika:
|
|
image: apache/tika:3.2.2.0-full
|
|
ports:
|
|
- 9998:9998
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
extensions: curl, xml, mbstring, zip
|
|
tools: composer
|
|
|
|
- name: Wait for Tika
|
|
run: |
|
|
timeout 120 bash -c \
|
|
"until curl -sf http://localhost:9998/tika; do sleep 2; done"
|
|
echo "Tika ready."
|
|
|
|
- name: Run apiSearchContent
|
|
run: |
|
|
BEHAT_SUITES=apiSearchContent \
|
|
SEARCH_EXTRACTOR_TYPE=tika \
|
|
SEARCH_EXTRACTOR_TIKA_TIKA_URL=http://localhost:9998 \
|
|
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE=true \
|
|
FRONTEND_FULL_TEXT_SEARCH_ENABLED=true \
|
|
bash tests/acceptance/run-github.sh
|
|
|
|
- name: Upload test logs
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: test-logs-apiSearchContent
|
|
path: tests/acceptance/output/
|
|
|
|
cli-tests:
|
|
name: ${{ matrix.suite }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite:
|
|
- cliCommands # needs ClamAV + email
|
|
- apiServiceAvailability
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
extensions: curl, xml, mbstring, zip
|
|
tools: composer
|
|
|
|
- name: Run ${{ matrix.suite }}
|
|
run: BEHAT_SUITES=${{ matrix.suite }} bash tests/acceptance/run-github.sh
|
|
|
|
- name: Upload test logs
|
|
if: failure()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: test-logs-${{ matrix.suite }}
|
|
path: tests/acceptance/output/
|
|
|
|
core-api-tests:
|
|
name: ${{ matrix.suite }}
|
|
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@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
extensions: curl, xml, mbstring, zip
|
|
tools: composer
|
|
|
|
- name: Run ${{ matrix.suite }}
|
|
run: >
|
|
BEHAT_SUITES="${{ matrix.suite }}"
|
|
ACCEPTANCE_TEST_TYPE=core-api
|
|
EXPECTED_FAILURES_FILE=tests/acceptance/expected-failures-API-on-OCIS-storage.md
|
|
bash tests/acceptance/run-github.sh
|
|
|
|
all-acceptance-tests:
|
|
needs: [acceptance-tests, local-api-tests-tika, cli-tests, core-api-tests]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Check all jobs passed
|
|
run: |
|
|
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
|
|
exit 1
|
|
fi
|