xref: /plugin/upgrade/.github/workflows/fullUpgrade.yml (revision 78220d5a60e1fcd8f1e2dabfbf90272349db7cd4)
1fc9fd1daSAndreas Gohrname: Full Upgrade Test
2fc9fd1daSAndreas Gohr
3fc9fd1daSAndreas Gohron: [push, pull_request]
4fc9fd1daSAndreas Gohr
5fc9fd1daSAndreas Gohrjobs:
6fc9fd1daSAndreas Gohr    modern:
7fc9fd1daSAndreas Gohr      name: DokuWiki ${{ matrix.dokuwiki-release }}
8fc9fd1daSAndreas Gohr      runs-on: ubuntu-latest
9fc9fd1daSAndreas Gohr      if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
10fc9fd1daSAndreas Gohr
11fc9fd1daSAndreas Gohr      strategy:
12fc9fd1daSAndreas Gohr        matrix:
13fc9fd1daSAndreas Gohr          dokuwiki-release:
14fc9fd1daSAndreas Gohr            - '2022-06-26rc' # igor
15fc9fd1daSAndreas Gohr            - '2020-07-29a' # hogfather
16fc9fd1daSAndreas Gohr            - '2018-04-22c' # greebo
17fc9fd1daSAndreas Gohr        fail-fast: true
18fc9fd1daSAndreas Gohr
19fc9fd1daSAndreas Gohr      steps:
20fc9fd1daSAndreas Gohr        - name: Setup PHP
21fc9fd1daSAndreas Gohr          uses: shivammathur/setup-php@v2
22fc9fd1daSAndreas Gohr          with:
23*78220d5aSAndreas Gohr            php-version: '8.2'
24fc9fd1daSAndreas Gohr            extensions: mbstring, intl, PDO, pdo_sqlite, bz2
25fc9fd1daSAndreas Gohr
26fc9fd1daSAndreas Gohr        - name: Download DokuWiki
27fc9fd1daSAndreas Gohr          run: |
28fc9fd1daSAndreas Gohr            wget https://github.com/dokuwiki/dokuwiki/archive/refs/tags/release-${{ matrix.dokuwiki-release }}.tar.gz -O dokuwiki-${{ matrix.dokuwiki-release }}.tgz
29fc9fd1daSAndreas Gohr            tar --strip-components 1 -xzf dokuwiki-${{ matrix.dokuwiki-release }}.tgz
30fc9fd1daSAndreas Gohr            rm dokuwiki-${{ matrix.dokuwiki-release }}.tgz
31fc9fd1daSAndreas Gohr
32fc9fd1daSAndreas Gohr        - name: Checkout
33fc9fd1daSAndreas Gohr          uses: actions/checkout@v3
34fc9fd1daSAndreas Gohr          with:
35fc9fd1daSAndreas Gohr            path: lib/plugins/upgrade
36fc9fd1daSAndreas Gohr
37fc9fd1daSAndreas Gohr        - name: Run Upgrade
38fc9fd1daSAndreas Gohr          run: |
39fc9fd1daSAndreas Gohr            pwd
40fc9fd1daSAndreas Gohr            php bin/plugin.php --loglevel info upgrade run
41fc9fd1daSAndreas Gohr
42fc9fd1daSAndreas Gohr    legacy:
43fc9fd1daSAndreas Gohr      name: DokuWiki ${{ matrix.dokuwiki-release }}
44fc9fd1daSAndreas Gohr      runs-on: ubuntu-latest
45fc9fd1daSAndreas Gohr      if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
46fc9fd1daSAndreas Gohr
47fc9fd1daSAndreas Gohr      strategy:
48fc9fd1daSAndreas Gohr        matrix:
49fc9fd1daSAndreas Gohr          dokuwiki-release:
50fc9fd1daSAndreas Gohr            - '2017-02-19g' # frusterick manners
51fc9fd1daSAndreas Gohr            - '2013-05-10a' # weatherwax
52fc9fd1daSAndreas Gohr            - '2009-12-25' # lemming
53fc9fd1daSAndreas Gohr            - '2006-11-06'
54fc9fd1daSAndreas Gohr        fail-fast: true
55fc9fd1daSAndreas Gohr
56fc9fd1daSAndreas Gohr      steps:
57fc9fd1daSAndreas Gohr        - name: Setup PHP
58fc9fd1daSAndreas Gohr          uses: shivammathur/setup-php@v2
59fc9fd1daSAndreas Gohr          with:
60*78220d5aSAndreas Gohr            php-version: '8.2'
61fc9fd1daSAndreas Gohr            extensions: mbstring, intl, PDO, pdo_sqlite, bz2
62fc9fd1daSAndreas Gohr
63fc9fd1daSAndreas Gohr        - name: Download DokuWiki
64fc9fd1daSAndreas Gohr          run: |
65fc9fd1daSAndreas Gohr            wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-${{ matrix.dokuwiki-release }}.tgz -O dokuwiki-${{ matrix.dokuwiki-release }}.tgz
66fc9fd1daSAndreas Gohr            tar --strip-components 1 -xzf dokuwiki-${{ matrix.dokuwiki-release }}.tgz
67fc9fd1daSAndreas Gohr            rm dokuwiki-${{ matrix.dokuwiki-release }}.tgz
68fc9fd1daSAndreas Gohr
69fc9fd1daSAndreas Gohr        - name: Checkout
70fc9fd1daSAndreas Gohr          uses: actions/checkout@v3
71fc9fd1daSAndreas Gohr          with:
72fc9fd1daSAndreas Gohr            path: lib/plugins/upgrade
73fc9fd1daSAndreas Gohr
74fc9fd1daSAndreas Gohr        - name: Run Upgrade
75fc9fd1daSAndreas Gohr          run: |
76fc9fd1daSAndreas Gohr            pwd
77fc9fd1daSAndreas Gohr            php lib/plugins/upgrade/legacy.php --loglevel info run
78