Skip to content

Commit

Permalink
Merge pull request #753 from PecanProject/test_postgres12
Browse files Browse the repository at this point in the history
Upgrade to Ruby 2.7 and PostGIS 12.3.3
  • Loading branch information
dlebauer authored Mar 29, 2023
2 parents 9af4b61 + 1457e6a commit 7165d63
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 12 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
fail-fast: false
matrix:
ruby:
- 2.5
- 2.6
# - 2.7 is not supported, results in error
- 2.7
postgres_image:
- postgis/postgis:12-3.3
services:
postgres:
image: mdillon/postgis:9.5
image: ${{ matrix.postgres_image }}
env:
POSTGRES_PASSWORD: bety
ports:
- 5432:5432
options: >-
Expand All @@ -32,8 +34,10 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
- name: Checkout code
uses: actions/checkout@v3
- name: Restore cache
uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ matrix.ruby}}-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -58,9 +62,11 @@ jobs:
- name: Build and test with Rake
env:
RAILS_ENV: test
POSTGRES_PASSWORD: bety
PGPASSWORD: bety
run: |
cp config/database.yml.gh config/database.yml
psql -h localhost -U postgres -c "CREATE USER bety WITH SUPERUSER CREATEDB UNENCRYPTED PASSWORD 'bety'";
psql -h localhost -U postgres -c "CREATE USER bety WITH SUPERUSER CREATEDB PASSWORD 'bety'";
psql -h localhost -U postgres -c "DROP DATABASE IF EXISTS test;"
psql -h localhost -U postgres -c "CREATE DATABASE test WITH OWNER bety;"
psql -h localhost -U bety -d test -c "CREATE EXTENSION postgis;"
Expand All @@ -75,6 +81,6 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build image
run: docker build --tag image --file Dockerfile .
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.5.9
ruby-2.7.7
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ You will need to install the latest version of BETY (or the version you want to

In this case you can simply pull down the version you want, and run `docker-compose bety migrate`.

## [5.x] -

### Changed

- License changed from UIUC/NCSA to BSD 3-Clause [#748](https://github.com/PecanProject/bety/pull/758).
The licenses are functionally the same, but BSD 3-Clause is more widely recognized.
This change is consistent with moving R packages in PEcAn project to BSD 3-Clause to comply with CRAN requirements.
- Updated GitHub actions to test and use supported versions of Rails (v2.7) and Postgres (12.3.3) [#753](https://github.com/PecanProject/bety/pull/753)
- **Important** Users who use the docker-compose file will need to either:
- dump the database first and then reload because this involves a database version upgrade
- switch the postgres image back to mdillon/postgis:9.5. This is not recommended because postgres v9.5 is no longer supported.


## [5.4.1] - 2021-10-10

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.6
FROM ruby:2.7
LABEL maintainer="Max Burnette <[email protected]>, Rob Kooper <[email protected]>"

# arguments that are added at the bottom of BETY
Expand Down
2 changes: 1 addition & 1 deletion config/database.yml.gh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ test:
database: test
pool: 5
username: postgres
password:
password: bety
host: localhost
port: 5432
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ services:

# postgresql + postgis to hold all the data
postgres:
image: mdillon/postgis:9.5
image: postgis/postgis:12-3.3
env:
POSTGRES_PASSWORD: bety
networks:
- bety
#ports:
Expand Down

0 comments on commit 7165d63

Please sign in to comment.