Skip to content

Commit e2c9b7a

Browse files
authored
Merge pull request #209 from stronk7/bump_travis_to_focal
Bump all travis files and docs to require Ubuntu 20.04
2 parents 15a7bf6 + 8ad9381 commit e2c9b7a

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.travis.dist.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: php
22

3+
dist: focal
4+
35
addons:
46
postgresql: "13"
57
apt:
@@ -17,9 +19,9 @@ cache:
1719
- $HOME/.npm
1820

1921
php:
20-
- 7.3
2122
- 7.4
2223
- 8.0
24+
- 8.1
2325

2426
env:
2527
global:

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: php
22

3+
dist: focal
4+
35
addons:
46
postgresql: "13"
57
apt:
@@ -54,7 +56,7 @@ script:
5456
- moodle-plugin-ci validate
5557
- moodle-plugin-ci savepoints
5658
- moodle-plugin-ci mustache
57-
- moodle-plugin-ci grunt || [ "$MOODLE_BRANCH" == 'MOODLE_38_STABLE' ]
59+
- moodle-plugin-ci grunt || [[ "$MOODLE_BRANCH" =~ MOODLE_3[0-9]+_STABLE ]] # Fixtures only compatible with Moodle >= 4.0
5860
- moodle-plugin-ci phpdoc
5961
- moodle-plugin-ci phpunit --verbose --coverage-text --fail-on-warning
6062
- moodle-plugin-ci behat --profile default
@@ -63,7 +65,7 @@ script:
6365
jobs:
6466
include:
6567
- stage: CI test (make validate)
66-
php: 7.3
68+
php: 7.4
6769
before_install: skip
6870
install:
6971
- make init

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
99
The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com).
1010

1111
## [Unreleased]
12+
### Changed
13+
- Modified the Travis templates and docs to point that, since [MDL-75012](https://tracker.moodle.org/browse/MDL-75012) (core update to Node 18), Ubuntu Focal 20.04 is the minimum required by runs.
1214

1315
## [3.4.7] - 2023-03-04
1416
### Changed

docs/TravisFileExplained.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ see [Travis CI's documentation](http://docs.travis-ci.com/user/getting-started/)
1111
# This is the language of our project.
1212
language: php
1313

14+
# Note that focal (20.04) is the minimum because Node 18 requires it.
15+
dist: focal
16+
1417
# Installs the updated version of PostgreSQL and extra APT packages.
1518
addons:
1619
postgresql: "13"
@@ -34,9 +37,9 @@ cache:
3437
# listed here will create a separate build and run the tests against that
3538
# version of PHP.
3639
php:
37-
- 7.3
3840
- 7.4
3941
- 8.0
42+
- 8.1
4043

4144
# This section sets up the environment variables for the build.
4245
env:

src/Installer/Database/PostgresDatabase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public function getCreateDatabaseCommand()
4141
if ($this->host === 'localhost') {
4242
$this->host = ''; // Use sockets or we'll need to edit pg_hba.conf and restart the server. Only if not set.
4343
$this->port = '5433'; // We also need the port to find the correct socket file.
44+
// Travis did it again, for PostgreSQL 13, they are back to port 5432. We need that to find the socket.
45+
if ((int) getenv('PGVER') === 13) {
46+
$this->port = '5432'; // We also need the port to find the correct socket file.
47+
}
4448
}
4549
}
4650
}

0 commit comments

Comments
 (0)