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