Compare commits

...
3 changed files with 156 additions and 72 deletions

No files matched your search

-5
View File
@@ -20,8 +20,3 @@ updates:
interval: "weekly" interval: "weekly"
open-pull-requests-limit: 2 open-pull-requests-limit: 2
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
+137 -64
View File
@@ -5,67 +5,8 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: 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:
needs: [coding-standard, check-gherkin-standard, check-suites-in-expected-failures]
name: build-and-test
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
acceptance-tests: acceptance-tests:
name: ${{ matrix.suite }} name: ${{ matrix.suite }}
needs: [build-and-test]
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@@ -86,7 +27,9 @@ jobs:
- apiActivities - apiActivities
# search # search
- apiSearch1 - apiSearch1
- apiSearch2
# contract & locks # contract & locks
- apiContract
- apiLocks - apiLocks
# sharing # sharing
- apiSharingNgItemInvitation - apiSharingNgItemInvitation
@@ -97,16 +40,26 @@ jobs:
- apiSharingNgItemLinkShare - apiSharingNgItemLinkShare
- apiSharingNgDriveLinkShare - apiSharingNgDriveLinkShare
- apiSharingNgLinkShareManagement - apiSharingNgLinkShareManagement
# auth
- apiAuthApp
# settings & notifications (needs email)
- apiSettings
- apiNotification
# antivirus (needs ClamAV)
- apiAntivirus
# federation (needs email + federation ocis)
- apiOcm
# collaboration (needs WOPI)
- apiCollaboration
steps: steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: actions/checkout@v4
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 - uses: actions/setup-go@v5
with: with:
go-version-file: go.mod go-version-file: go.mod
cache: true cache: true
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0 - uses: shivammathur/setup-php@v2
with: with:
php-version: "8.4" php-version: "8.4"
extensions: curl, xml, mbstring, zip extensions: curl, xml, mbstring, zip
@@ -115,8 +68,128 @@ jobs:
- name: Run ${{ matrix.suite }} - name: Run ${{ matrix.suite }}
run: BEHAT_SUITES=${{ matrix.suite }} bash tests/acceptance/run-github.sh 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: all-acceptance-tests:
needs: [acceptance-tests] needs: [acceptance-tests, local-api-tests-tika, cli-tests, core-api-tests]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: always() if: always()
steps: steps:
+19 -3
View File
@@ -38,6 +38,10 @@ NATS_NATS_HOST=0.0.0.0 \
NATS_NATS_PORT=9233 \ NATS_NATS_PORT=9233 \
OCIS_JWT_SECRET=some-ocis-jwt-secret \ OCIS_JWT_SECRET=some-ocis-jwt-secret \
WEB_UI_CONFIG_FILE="$REPO_ROOT/tests/config/drone/ocis-config.json" \ WEB_UI_CONFIG_FILE="$REPO_ROOT/tests/config/drone/ocis-config.json" \
SEARCH_EXTRACTOR_TYPE="${SEARCH_EXTRACTOR_TYPE:-basic}" \
SEARCH_EXTRACTOR_TIKA_TIKA_URL="${SEARCH_EXTRACTOR_TIKA_TIKA_URL:-}" \
SEARCH_EXTRACTOR_CS3SOURCE_INSECURE="${SEARCH_EXTRACTOR_CS3SOURCE_INSECURE:-false}" \
FRONTEND_FULL_TEXT_SEARCH_ENABLED="${FRONTEND_FULL_TEXT_SEARCH_ENABLED:-false}" \
"$WRAPPER_BIN" serve \ "$WRAPPER_BIN" serve \
--bin "$OCIS_BIN" \ --bin "$OCIS_BIN" \
--url "$OCIS_URL" \ --url "$OCIS_URL" \
@@ -54,11 +58,23 @@ timeout 300 bash -c \
echo "ocis ready." echo "ocis ready."
# run acceptance tests for declared suites # run acceptance tests for declared suites
echo "Running suites: $BEHAT_SUITES" # ACCEPTANCE_TEST_TYPE: "api" (default) or "core-api"
ACCEPTANCE_TEST_TYPE="${ACCEPTANCE_TEST_TYPE:-api}"
if [ "$ACCEPTANCE_TEST_TYPE" = "core-api" ]; then
_FILTER_TAGS="~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
_EXPECTED_FAILURES="${EXPECTED_FAILURES_FILE:-$REPO_ROOT/tests/acceptance/expected-failures-API-on-OCIS-storage.md}"
else
_FILTER_TAGS="~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage"
_EXPECTED_FAILURES="${EXPECTED_FAILURES_FILE:-$REPO_ROOT/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md}"
fi
echo "Running suites: $BEHAT_SUITES (type: $ACCEPTANCE_TEST_TYPE)"
TEST_SERVER_URL=$OCIS_URL \ TEST_SERVER_URL=$OCIS_URL \
OCIS_WRAPPER_URL=http://localhost:5200 \ OCIS_WRAPPER_URL=http://localhost:5200 \
BEHAT_SUITES=$BEHAT_SUITES \ BEHAT_SUITES=$BEHAT_SUITES \
BEHAT_FILTER_TAGS="~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage" \ ACCEPTANCE_TEST_TYPE=$ACCEPTANCE_TEST_TYPE \
EXPECTED_FAILURES_FILE="$REPO_ROOT/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md" \ BEHAT_FILTER_TAGS="$_FILTER_TAGS" \
EXPECTED_FAILURES_FILE="$_EXPECTED_FAILURES" \
STORAGE_DRIVER=ocis \ STORAGE_DRIVER=ocis \
make -C "$REPO_ROOT" test-acceptance-api make -C "$REPO_ROOT" test-acceptance-api