зеркало из https://github.com/nextcloud/cookbook.git
Merge pull request #1285 from nextcloud/maintenance/prepare-nc25
Update action scripts to prepare the NC 25 release
This commit is contained in:
Коммит
08e7930690
|
@ -9,6 +9,8 @@
|
|||
<version>%%VERSION%%</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="github@christian-wolf.click">Christian Wolf</author>
|
||||
<author mail="info@sebastianfey.de">Sebastian Fey</author>
|
||||
<author mail="mail@marcelrobitaille.me">Marcel Robitaille</author>
|
||||
<author mail="mrzapp@users.noreply.github.com">Jeppe Zapp</author>
|
||||
<namespace>Cookbook</namespace>
|
||||
<category>organization</category>
|
||||
|
|
|
@ -9,7 +9,7 @@ fi
|
|||
|
||||
deploy_path='.github/actions/deploy'
|
||||
|
||||
stable_branch=stable
|
||||
stable_branch=$(cat "$deploy_path/stable_name")
|
||||
master_branch=master
|
||||
|
||||
major=$(cat "$deploy_path/major")
|
||||
|
@ -79,8 +79,7 @@ git merge --no-ff $stable_branch
|
|||
|
||||
git remote add tokenized "https://nextcloud-cookbook-bot:$BOT_TOKEN@github.com/nextcloud/cookbook.git"
|
||||
|
||||
git -c "http.https://github.com/.extraheader=" push tokenized $stable_branch
|
||||
git -c "http.https://github.com/.extraheader=" push tokenized $master_branch
|
||||
git -c "http.https://github.com/.extraheader=" push tokenized $stable_branch $master_branch
|
||||
git push origin "v$version"
|
||||
|
||||
echo "::set-output name=version::$version"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
stable
|
|
@ -37,4 +37,4 @@ if [ -n "$suffix" ]; then
|
|||
version_arr="$version_arr, '-$suffix'"
|
||||
fi
|
||||
sed "/VERSION_TAG/s@[[].*[]]@[$version_arr]@" -i lib/Controller/UtilApiController.php
|
||||
git add lib/Controller/MainController.php
|
||||
git add lib/Controller/UtilApiController.php
|
||||
|
|
|
@ -41,6 +41,7 @@ runs:
|
|||
if [ "${{ inputs.installUntested }}" = 'true' ]; then PARAM="$PARAM --install-untested"; fi &&
|
||||
if [ "${{ inputs.runCodeChecker }}" = 'true' ]; then PARAM="$PARAM --run-code-checker"; fi &&
|
||||
cd .github/actions/run-tests &&
|
||||
sudo pip install -r requirements.txt &&
|
||||
./run-locally.py
|
||||
$PARAM
|
||||
--pull
|
||||
|
|
|
@ -23,12 +23,12 @@ jobs:
|
|||
shell: bash
|
||||
id: check
|
||||
run: |
|
||||
echo "::set-output name=skip::false"
|
||||
echo "skip=false" >> $GITHUB_OUTPUT
|
||||
if [ -z "${{ secrets.DOCKER_HUB_TOKEN }}" ]; then
|
||||
echo "::set-output name=skip::true"
|
||||
echo "skip=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if [ -z "${{ secrets.DOCKER_HUB_USERNAME }}" ]; then
|
||||
echo "::set-output name=skip::true"
|
||||
echo "skip=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Checkout the app
|
||||
|
|
|
@ -4,7 +4,7 @@ name: Deploy to Appstore
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- stable
|
||||
- stable*
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -29,7 +29,7 @@ jobs:
|
|||
|
||||
- name: Get the date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
||||
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||
- name: Use cache for NPM
|
||||
uses: actions/cache@v3.0.11
|
||||
with:
|
||||
|
@ -120,7 +120,7 @@ jobs:
|
|||
ret=$? &&
|
||||
code=$(echo "$curl_out" | tail -n 1) &&
|
||||
msg=$(echo "$curl_out" | head -n -1) &&
|
||||
echo "::set-output name=code::$code" &&
|
||||
echo "::set-output name=msg::$msg" &&
|
||||
echo "code=$code" >> $GITHUB_OUTPUT &&
|
||||
echo "msg=$msg" >> $GITHUB_OUTPUT &&
|
||||
echo "Result ($code): $msg" &&
|
||||
echo "$code" | grep '^\([^45][0-9][0-9]\)$'
|
||||
|
|
|
@ -41,7 +41,7 @@ jobs:
|
|||
run: |
|
||||
count=$(find docs/ -name \*.puml | wc -l)
|
||||
echo "There are $count plantuml files"
|
||||
echo "::set-output name=num::$count"
|
||||
echo "num=$count" >> $GITHUB_OUTPUT
|
||||
- name: Install PlantUML on demand
|
||||
if: steps.count-plantuml.outputs.num > 0
|
||||
run: |
|
||||
|
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
run: |
|
||||
git diff HEAD~1 -- CHANGELOG.md
|
||||
lines=$(git diff HEAD~1 -- CHANGELOG.md | wc -l)
|
||||
echo "::set-output name=lines::$lines"
|
||||
echo "lines=$lines" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Get all changed file names
|
||||
id: file-names
|
||||
|
@ -31,7 +31,7 @@ jobs:
|
|||
echo "$lines"
|
||||
cnt="$(echo "$lines" | grep -v '^package-lock.json$' | wc -l)"
|
||||
echo "That are $cnt changed files."
|
||||
echo "::set-output name=num::$cnt"
|
||||
echo "num=$cnt" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Error if the number of diff lines is zero
|
||||
run: |
|
||||
|
@ -118,7 +118,7 @@ jobs:
|
|||
fetch-depth: 1
|
||||
- name: Get the date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
||||
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||
- name: Cache NPM cache
|
||||
uses: actions/cache@v3.0.11
|
||||
with:
|
||||
|
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
|
||||
- name: Get the date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
||||
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||
- name: Cache NPM cache
|
||||
uses: actions/cache@v3.0.11
|
||||
with:
|
||||
|
@ -62,7 +62,7 @@ jobs:
|
|||
|
||||
- name: Install Node packages
|
||||
shell: bash
|
||||
run: npm -q install || { cat ~/.npm/eresolve-report.txt ; exit 1; }
|
||||
run: npm -q ci || { cat ~/.npm/eresolve-report.txt ; exit 1; }
|
||||
|
||||
- name: Run PHP linter
|
||||
shell: bash
|
||||
|
@ -111,10 +111,11 @@ jobs:
|
|||
database:
|
||||
- mysql
|
||||
coreVersion:
|
||||
- stable21
|
||||
- stable22
|
||||
- stable23
|
||||
- stable24
|
||||
- 21
|
||||
- 22
|
||||
- 23
|
||||
- 24
|
||||
- 25
|
||||
phpVersion:
|
||||
- "8.0"
|
||||
httpServer:
|
||||
|
@ -122,23 +123,23 @@ jobs:
|
|||
include:
|
||||
# Test different databses
|
||||
- database: sqlite
|
||||
coreVersion: stable24
|
||||
coreVersion: 25
|
||||
phpVersion: "8.1"
|
||||
httpServer: "apache"
|
||||
- database: pgsql
|
||||
coreVersion: stable24
|
||||
coreVersion: 25
|
||||
phpVersion: "8.1"
|
||||
httpServer: "apache"
|
||||
|
||||
# Test different PHP versions additionally
|
||||
- database: mysql
|
||||
coreVersion: stable24
|
||||
coreVersion: 25
|
||||
phpVersion: "8.1"
|
||||
httpServer: "apache"
|
||||
|
||||
# Test different HTTP server
|
||||
- database: mysql
|
||||
coreVersion: stable24
|
||||
coreVersion: 25
|
||||
phpVersion: "8.1"
|
||||
httpServer: "nginx"
|
||||
|
||||
|
@ -154,46 +155,73 @@ jobs:
|
|||
|
||||
#- name: Docker Layer Caching
|
||||
#uses: satackey/action-docker-layer-caching@v0.0.8
|
||||
|
||||
|
||||
- name: Install helper program
|
||||
shell: bash
|
||||
run: |-
|
||||
pip install yq
|
||||
|
||||
- name: Get the min and max compatible server versions from manifest XML file
|
||||
shell: bash
|
||||
id: ncVersionRequirements
|
||||
run: |-
|
||||
minVersion="$(cat appinfo/info.xml | xq '.info.dependencies.nextcloud."@min-version"' -r)"
|
||||
maxVersion="$(cat appinfo/info.xml | xq '.info.dependencies.nextcloud."@max-version"' -r)"
|
||||
echo "minVersion=$minVersion" >> $GITHUB_OUTPUT
|
||||
echo "maxVersion=$maxVersion" >> $GITHUB_OUTPUT
|
||||
echo "Compatible NC server versions: [$minVersion, $maxVersion]"
|
||||
if [ "${{ matrix.coreVersion }}" -ge "$minVersion" -a "${{ matrix.coreVersion }}" -le "$maxVersion" ]; then
|
||||
mv="true"
|
||||
else
|
||||
mv="false"
|
||||
echo "Skipping the main tests as this version is marked incompatible with the installed NC version." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
echo "matchingVersion=$mv" >> $GITHUB_OUTPUT
|
||||
echo "The app is compatible with the current NV core v${{ matrix.coreVersion }}: $mv"
|
||||
|
||||
|
||||
- name: Run the tests in docker container
|
||||
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true'
|
||||
uses: ./.github/actions/run-tests
|
||||
with:
|
||||
db: ${{ matrix.database }}
|
||||
phpVersion: ${{ matrix.phpVersion }}
|
||||
server: ${{ matrix.httpServer }}
|
||||
coreVersion: ${{ matrix.coreVersion }}
|
||||
coreVersion: stable${{ matrix.coreVersion }}
|
||||
|
||||
- name: Upload the log file as artifact
|
||||
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true' && always()
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: Nextcloud-logs (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
name: Nextcloud-logs (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
path: .github/actions/run-tests/volumes/data/nextcloud.log
|
||||
|
||||
- name: Copy coverage-reports into non-link folder
|
||||
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true'
|
||||
shell: bash
|
||||
run: >-
|
||||
mkdir /tmp/coverage &&
|
||||
rsync -a .github/actions/run-tests/volumes/coverage/latest/ /tmp/coverage
|
||||
|
||||
- name: Upload the code coverage report for codecov as artifacts
|
||||
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true'
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Code coverage (XML) (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
name: Code coverage (XML) (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
path: "/tmp/coverage/coverage.*.xml"
|
||||
|
||||
# - name: Upload the code coverage report (unit tests) as artifacts
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: Code coverage (HTML) (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
# name: Code coverage (HTML) (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
# path: "/tmp/coverage"
|
||||
|
||||
- name: Upload the junit log file artifact as artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Junit test log files (${{matrix.database}}, ${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
name: Junit test log files (${{matrix.database}}, stable${{matrix.coreVersion}}, ${{matrix.httpServer}}, ${{matrix.phpVersion}})
|
||||
path: .github/actions/run-tests/volumes/coverage/junit*.xml
|
||||
if: always()
|
||||
if: steps.ncVersionRequirements.outputs.matchingVersion == 'true' && always()
|
||||
|
||||
unit-tests-master:
|
||||
name: Run the tests against the master branch of the NC server
|
||||
|
@ -357,7 +385,7 @@ jobs:
|
|||
|
||||
- name: Get the date
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
|
||||
run: echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
|
||||
- name: Use cache for NPM
|
||||
uses: actions/cache@v3.0.11
|
||||
with:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
stable
|
|
@ -48,6 +48,8 @@
|
|||
[1273](https://github.com/nextcloud/cookbook/pull/1273)
|
||||
[1274](https://github.com/nextcloud/cookbook/pull/1274)
|
||||
[1277](https://github.com/nextcloud/cookbook/pull/1277)
|
||||
- Prepare the GitHub action scripts to be compatible with the upcoming version split in version 0.10.0
|
||||
[#1285](https://github.com/nextcloud/cookbook/pull/1285) @christianlupus
|
||||
|
||||
### Documentation
|
||||
- Fix bad writing
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<version>0.9.15</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="github@christian-wolf.click">Christian Wolf</author>
|
||||
<author mail="info@sebastianfey.de">Sebastian Fey</author>
|
||||
<author mail="mail@marcelrobitaille.me">Marcel Robitaille</author>
|
||||
<author mail="mrzapp@users.noreply.github.com">Jeppe Zapp</author>
|
||||
<namespace>Cookbook</namespace>
|
||||
<category>organization</category>
|
||||
|
|
|
@ -19,7 +19,7 @@ class UtilApiController extends ApiController {
|
|||
*/
|
||||
public function getApiVersion(): JSONResponse {
|
||||
$response = [
|
||||
'cookbook_version' => [0, 9, 14], /* VERSION_TAG do not change this line manually */
|
||||
'cookbook_version' => [0, 9, 15], /* VERSION_TAG do not change this line manually */
|
||||
'api_version' => [
|
||||
'epoch' => 0,
|
||||
'major' => 1,
|
||||
|
|
Загрузка…
Ссылка в новой задаче