ci: automate upgrade testing#1019
Conversation
b714a55 to
48467b1
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
48467b1 to
2771035
Compare
PHP Code CoverageCoverage after merging upgrade-testing-local-setup into release/2.11 will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
69ffef9 to
6b30af6
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
9ecc483 to
b85fe46
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
97a83af to
64f2bab
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
f5123d9 to
13059b1
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
13059b1 to
3234322
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
e7f22dd to
c696b82
Compare
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
|
question is: |
| PREVIOUS_APP_VERSION: 2.9.2 | ||
| UPGRADE_APP_VERSION: 2.10.0 |
There was a problem hiding this comment.
we should install the current compatible app version without specifying the version.
The app version to upgrade should be greater than the current version.
| - name: Build nextcloud project | ||
| run: | | ||
| export DEBIAN_FRONTEND=noninteractive |
There was a problem hiding this comment.
can we start nextcloud in the service section?
There was a problem hiding this comment.
Possibly, but why do you think so?
| - name: Setup System dependencies for appstore | ||
| run: | | ||
| sudo apt install -y \ | ||
| python3-venv \ | ||
| python3-wheel \ | ||
| libxslt-dev \ | ||
| libxml2-dev \ | ||
| libz-dev \ | ||
| libpq-dev \ | ||
| build-essential \ | ||
| python3-dev \ | ||
| python3-setuptools \ | ||
| gettext \ | ||
| libssl-dev \ | ||
| libffi-dev \ | ||
| nodejs \ | ||
| yarn | ||
|
|
||
| - name: Checkout appstore | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 | ||
| with: | ||
| repository: nextcloud/appstore | ||
| path: appstore | ||
|
|
||
| - name: Install Appstore | ||
| run: | | ||
| cd appstore | ||
| python3 -m venv venv | ||
| source venv/bin/activate | ||
| pip install poetry==1.8.2 | ||
| make dev-setup | ||
| python manage.py runserver & |
There was a problem hiding this comment.
hmm, maybe we should create custom minimal REST server as appstore
There was a problem hiding this comment.
but can be next improvement
| with: | ||
| path: integration_openproject | ||
| fetch-tags: true | ||
| ref: v${{ env.UPGRADE_APP_VERSION }} |
There was a problem hiding this comment.
not sure about it. simply checkout the current source
| coverage: xdebug | ||
| tools: php-cs-fixer, phpunit |
There was a problem hiding this comment.
do we need xdebug and the other tools?
|
|
||
| env: | ||
| DJANGO_SETTINGS_MODULE: nextcloudappstore.settings.development | ||
| PREVIOUS_APP_VERSION: 2.9.2 |
There was a problem hiding this comment.
that version should be found automatically. Just take the last released stable version.
Otherwise, there is one more place to remember to change version numbers.
individual-it
left a comment
There was a problem hiding this comment.
in the log output of the test run I see
Error response from daemon: No such container: nextcloud
what is that about? Kind of confusing to see this error.
| wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh | ||
| bash ./self-hosted-app-store.sh | ||
|
|
||
| - name: Enable other apps from official app store |
There was a problem hiding this comment.
this is not entirely true, because at least activity is cloned further up by git
There was a problem hiding this comment.
The Activity app is not available in the App Store. It is a core app of Nextcloud. It is not included when the Nextcloud source is from Git.
There was a problem hiding this comment.
then maybe call the step enable other required apps
| env: | ||
| APP_VERSION: ${{ env.UPGRADE_APP_VERSION }} | ||
| run: | | ||
| bash ./self-hosted-app-store.sh |
There was a problem hiding this comment.
the name of that bash file is confusing. It sounds as if it starts the app-store, but that is not true.
There was a problem hiding this comment.
Renamed it to register-and-publish-app-to-self-hosted-appstore.sh. Does that sound good?
| cd ~/html/nextcloud | ||
| # latest data didn't get fetched properly, so we need to clear the appstore cache | ||
| echo "" > ~/html/nextcloud/data/appdata_*/appstore/apps.json | ||
| php occ app:update --allow-unstable integration_openproject |
There was a problem hiding this comment.
we should check whether the upgrade to the new version really happened
| --admin-user admin \ | ||
| --admin-pass admin | ||
| php occ maintenance:mode --off | ||
| sudo php -S localhost:80 -t ~/html/nextcloud & |
There was a problem hiding this comment.
it would be better to run NC with a real web-server like apache, but for now this should be fine
| - name: Check for Appstore | ||
| run: | | ||
| cd appstore | ||
| status=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:8000) |
There was a problem hiding this comment.
that appstore URL could go into a variable, because it is used in a lot of places
| echo "FAILED (status: $status)" | ||
| fi | ||
|
|
||
| - name: Register and publish integration_openproject apps |
There was a problem hiding this comment.
the previous app version can be installed from the official app store. Just take the latest published stable version
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
There is user cleanup code where it tries to clean up users in Docker container in CI. But in this PR we are not running Nextcloud inside Docker, so the cleanup step is still executing and Docker is reporting that the container nextcloud is not found. |
|
Can we skip the docker cleanup step somehow? It's really hard to keep on remembering that error message to ignore |
Description
This PR adds an upgrade testing workflow.
It validates the full upgrade path by:
integration_openprojectapps from self-hosted app store.integration_openprojectapps from self-hosted app store.Tests run across multiple Nextcloud and PHP version combinations.
Available env:
NEXTCLOUD_VERSIONS: Nextcloud versions to test.
PHP_VERSIONS: PHP versions to test.
PREVIOUS_APP_VERSION: App version installed first (old version).
UPGRADE_APP_VERSION: App version installed during upgrade (new version).
For now, this workflow runs on every pull request.
The open question is:
Related Issue or Workpackage
Screenshots (if appropriate):
Types of changes
Checklist:
CHANGELOG.mdfile