feat: Add onetime apppassword endpoint #696
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | |
| # SPDX-License-Identifier: GPL-3.0-or-later | |
| name: Build and test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| types: [synchronize, opened, reopened, ready_for_review] | |
| branches: | |
| - main | |
| - develop | |
| env: | |
| DESTINATION_IOS: platform=iOS Simulator,name=iPhone 16,OS=18.5 | |
| DESTINATION_MACOS: platform=macOS,arch=x86_64 | |
| SCHEME: NextcloudKit | |
| SERVER_BRANCH: stable30 | |
| PHP_VERSION: 8.3 | |
| jobs: | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: macos-15 | |
| if: github.event.pull_request.draft == false | |
| steps: | |
| - name: Set env var | |
| run: echo "DEVELOPER_DIR=$(xcode-select --print-path)" >> $GITHUB_ENV | |
| - uses: actions/checkout@v4 | |
| - name: Set up php ${{ env.PHP_VERSION }} | |
| uses: shivammathur/setup-php@8872c784b04a1420e81191df5d64fbd59d3d3033 # v2.30.0 | |
| with: | |
| php-version: ${{ env.PHP_VERSION }} | |
| # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation | |
| extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql | |
| coverage: none | |
| ini-file: development | |
| # Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on | |
| ini-values: apc.enable_cli=on, disable_functions= | |
| - name: Checkout server | |
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
| with: | |
| submodules: true | |
| repository: nextcloud/server | |
| path: server | |
| ref: ${{ env.SERVER_BRANCH }} | |
| - name: Set up Nextcloud | |
| run: | | |
| mkdir server/data | |
| ./server/occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin | |
| ./server/occ config:system:set hashing_default_password --value=true --type=boolean | |
| ./server/occ config:system:set auth.bruteforce.protection.enabled --value false --type bool | |
| ./server/occ config:system:set ratelimit.protection.enabled --value false --type bool | |
| ./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu" | |
| ./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu" | |
| ./server/occ background:cron | |
| PHP_CLI_SERVER_WORKERS=5 php -S localhost:8080 -t server/ & | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 | |
| with: | |
| xcode-version: '26.0.1' | |
| - name: Build & Test NextcloudKit | |
| run: | | |
| set -o pipefail && xcodebuild test -scheme "$SCHEME" \ | |
| -destination "$DESTINATION_IOS" \ | |
| -test-iterations 3 \ | |
| -retry-tests-on-failure \ | |
| | xcpretty | |