13 - name: Checking out code
14 uses: actions/checkout@v2
16 - name: Configuring node & npm
20 - name: Installing node stuff
26 - name: Looking for uncommitted changes
27 # Add all files to the git index and then run diff --cached to see all changes.
28 # This ensures that we get the status of all files, including new files.
29 # We ignore npm-shrinkwrap.json to make the tasks immune to npm changes.
32 git reset -- npm-shrinkwrap.json
33 git diff --cached --exit-code
36 runs-on: ${{ matrix.os }}
39 image: moodlehq/moodle-exttests
58 - name: Setting up DB mysql
59 if: ${{ matrix.db == 'mysqli' }}
60 uses: johanmeiring/mysql-action@tmpfs-patch
62 collation server: utf8mb4_bin
69 - name: Setting up DB pgsql
70 if: ${{ matrix.db == 'pgsql' }}
71 uses: m4nu56/postgresql-action@v1
73 postgresql version: 9.6
76 postgresql password: test
78 - name: Configuring git vars
79 uses: rlespinasse/github-slug-action@v3.x
81 - name: Setting up PHP ${{ matrix.php }}
82 uses: shivammathur/setup-php@v2
84 php-version: ${{ matrix.php }}
87 - name: Checking out code from ${{ env.GITHUB_REF_SLUG }}
88 uses: actions/checkout@v2
90 - name: Setting up PHPUnit
92 dbtype: ${{ matrix.db }}
94 echo "pathtophp=$(which php)" >> $GITHUB_ENV # Inject installed pathtophp to env. The template config needs it.
95 cp .github/workflows/config-template.php config.php
97 sudo locale-gen en_AU.UTF-8
98 php admin/tool/phpunit/cli/init.php --no-composer-self-update
100 - name: Running PHPUnit tests
102 dbtype: ${{ matrix.db }}
103 run: vendor/bin/phpunit -v