Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ad3469c44 | ||
|
|
825838898d | ||
|
|
d69ffb2cb9 | ||
|
|
524cd79841 | ||
|
|
a7a5ed8a91 | ||
|
|
b620b5453a |
No files matched your search
@@ -19,4 +19,9 @@ updates:
|
|||||||
schedule:
|
schedule:
|
||||||
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"
|
||||||
|
|
||||||
@@ -55,8 +55,7 @@ branches:
|
|||||||
require_code_owner_reviews: false
|
require_code_owner_reviews: false
|
||||||
required_status_checks:
|
required_status_checks:
|
||||||
strict: false
|
strict: false
|
||||||
contexts:
|
contexts: []
|
||||||
- continuous-integration/drone/pr
|
|
||||||
enforce_admins: null
|
enforce_admins: null
|
||||||
restrictions:
|
restrictions:
|
||||||
apps: []
|
apps: []
|
||||||
@@ -74,8 +73,7 @@ branches:
|
|||||||
require_code_owner_reviews: false
|
require_code_owner_reviews: false
|
||||||
required_status_checks:
|
required_status_checks:
|
||||||
strict: false
|
strict: false
|
||||||
contexts:
|
contexts: []
|
||||||
- continuous-integration/drone/pr
|
|
||||||
enforce_admins: null
|
enforce_admins: null
|
||||||
restrictions:
|
restrictions:
|
||||||
apps: []
|
apps: []
|
||||||
|
|||||||
@@ -0,0 +1,126 @@
|
|||||||
|
name: Acceptance Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
coding-standard:
|
||||||
|
name: coding-standard
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: shivammathur/setup-php@v2
|
||||||
|
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@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
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@v4
|
||||||
|
- name: Check suites
|
||||||
|
run: bash tests/acceptance/check-deleted-suites-in-expected-failure.sh
|
||||||
|
|
||||||
|
build-and-test:
|
||||||
|
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:
|
||||||
|
needs: [coding-standard, check-gherkin-standard, check-suites-in-expected-failures]
|
||||||
|
name: ${{ matrix.suite }}
|
||||||
|
needs: [build-and-test]
|
||||||
|
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
|
||||||
|
# contract & locks
|
||||||
|
- apiLocks
|
||||||
|
# sharing
|
||||||
|
- apiSharingNgItemInvitation
|
||||||
|
- apiSharingNgPermissions
|
||||||
|
- apiSharingNgShares
|
||||||
|
- apiSharingNgAdditionalShareRole
|
||||||
|
- apiSharingNgDriveInvitation
|
||||||
|
- apiSharingNgItemLinkShare
|
||||||
|
- apiSharingNgDriveLinkShare
|
||||||
|
- apiSharingNgLinkShareManagement
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
|
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- 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 }} bash tests/acceptance/run-github.sh
|
||||||
|
|
||||||
|
all-acceptance-tests:
|
||||||
|
needs: [build-and-test, acceptance-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
|
||||||
Executable
+64
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||||
|
OCIS_BIN="$REPO_ROOT/ocis/bin/ocis"
|
||||||
|
WRAPPER_BIN="$REPO_ROOT/tests/ociswrapper/bin/ociswrapper"
|
||||||
|
OCIS_URL="https://localhost:9200"
|
||||||
|
OCIS_CONFIG_DIR="$HOME/.ocis/config"
|
||||||
|
|
||||||
|
# suite(s) to run — set via env or passed from CI matrix
|
||||||
|
: "${BEHAT_SUITES:?BEHAT_SUITES is required, e.g. BEHAT_SUITES=apiGraph bash run-graph.sh}"
|
||||||
|
|
||||||
|
# build
|
||||||
|
make -C "$REPO_ROOT/ocis" build
|
||||||
|
GOWORK=off make -C "$REPO_ROOT/tests/ociswrapper" build
|
||||||
|
|
||||||
|
# php deps
|
||||||
|
cd "$REPO_ROOT"
|
||||||
|
composer install --no-progress
|
||||||
|
composer bin behat install --no-progress
|
||||||
|
|
||||||
|
# init ocis config
|
||||||
|
"$OCIS_BIN" init --insecure true
|
||||||
|
cp "$REPO_ROOT/tests/config/drone/app-registry.yaml" "$OCIS_CONFIG_DIR/app-registry.yaml"
|
||||||
|
|
||||||
|
# start ociswrapper in background, kill on exit
|
||||||
|
OCIS_URL=$OCIS_URL \
|
||||||
|
OCIS_CONFIG_DIR=$OCIS_CONFIG_DIR \
|
||||||
|
STORAGE_USERS_DRIVER=ocis \
|
||||||
|
PROXY_ENABLE_BASIC_AUTH=true \
|
||||||
|
OCIS_EXCLUDE_RUN_SERVICES=idp \
|
||||||
|
OCIS_LOG_LEVEL=error \
|
||||||
|
IDM_CREATE_DEMO_USERS=true \
|
||||||
|
IDM_ADMIN_PASSWORD=admin \
|
||||||
|
OCIS_ASYNC_UPLOADS=true \
|
||||||
|
OCIS_EVENTS_ENABLE_TLS=false \
|
||||||
|
NATS_NATS_HOST=0.0.0.0 \
|
||||||
|
NATS_NATS_PORT=9233 \
|
||||||
|
OCIS_JWT_SECRET=some-ocis-jwt-secret \
|
||||||
|
WEB_UI_CONFIG_FILE="$REPO_ROOT/tests/config/drone/ocis-config.json" \
|
||||||
|
"$WRAPPER_BIN" serve \
|
||||||
|
--bin "$OCIS_BIN" \
|
||||||
|
--url "$OCIS_URL" \
|
||||||
|
--admin-username admin \
|
||||||
|
--admin-password admin &
|
||||||
|
WRAPPER_PID=$!
|
||||||
|
trap "kill $WRAPPER_PID 2>/dev/null || true" EXIT
|
||||||
|
|
||||||
|
# wait for ocis graph API to be ready
|
||||||
|
echo "Waiting for ocis..."
|
||||||
|
timeout 300 bash -c \
|
||||||
|
"while [ \$(curl -sk -uadmin:admin $OCIS_URL/graph/v1.0/users/admin \
|
||||||
|
-w %{http_code} -o /dev/null) != 200 ]; do sleep 1; done"
|
||||||
|
echo "ocis ready."
|
||||||
|
|
||||||
|
# run acceptance tests for declared suites
|
||||||
|
echo "Running suites: $BEHAT_SUITES"
|
||||||
|
TEST_SERVER_URL=$OCIS_URL \
|
||||||
|
OCIS_WRAPPER_URL=http://localhost:5200 \
|
||||||
|
BEHAT_SUITES=$BEHAT_SUITES \
|
||||||
|
BEHAT_FILTER_TAGS="~@skip&&~@skipOnGraph&&~@skipOnOcis-OCIS-Storage" \
|
||||||
|
EXPECTED_FAILURES_FILE="$REPO_ROOT/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md" \
|
||||||
|
STORAGE_DRIVER=ocis \
|
||||||
|
make -C "$REPO_ROOT" test-acceptance-api
|
||||||
Reference in new issue
Block a user