Skip to content

Commit

Permalink
ci: Update postgres versions to 14, 15
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelespinoza committed Jun 10, 2023
1 parent 46d46f9 commit 242722e
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:12-alpine
FROM postgres:14-alpine
WORKDIR /var/lib/postgresql
COPY .ci/postgres/server.sh scripts/
RUN scripts/server.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:13-alpine
FROM postgres:15-alpine
WORKDIR /var/lib/postgresql
COPY .ci/postgres/server.sh scripts/
RUN scripts/server.sh
Expand Down
6 changes: 3 additions & 3 deletions .ci/postgres/v12.yml → .ci/postgres/v14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ services:
server:
build:
context: "${BUILD_DIR}"
dockerfile: "${BUILD_DIR}/.ci/postgres/server_v12.Dockerfile"
image: godfish_test/postgres/server_v12:latest
container_name: godfish_ci_postgres_server_v12
dockerfile: "${BUILD_DIR}/.ci/postgres/server_v14.Dockerfile"
image: godfish_test/postgres/server_v14:latest
container_name: godfish_ci_postgres_server_v14
env_file:
- env
expose:
Expand Down
6 changes: 3 additions & 3 deletions .ci/postgres/v13.yml → .ci/postgres/v15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ services:
server:
build:
context: "${BUILD_DIR}"
dockerfile: "${BUILD_DIR}/.ci/postgres/server_v13.Dockerfile"
image: godfish_test/postgres/server_v13:latest
container_name: godfish_ci_postgres_server_v13
dockerfile: "${BUILD_DIR}/.ci/postgres/server_v15.Dockerfile"
image: godfish_test/postgres/server_v15:latest
container_name: godfish_ci_postgres_server_v15
env_file:
- env
expose:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-postgres.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: postgres
on: [push, pull_request]
jobs:
v12:
name: postgres v12
v14:
name: postgres v14
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Build environment and run tests
run: make -f ci.Makefile ci-postgres12-up
run: make -f ci.Makefile ci-postgres14-up
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: /tmp/cover.out,/tmp/cover_driver.out
verbose: true
- name: Teardown
run: make -f ci.Makefile ci-postgres12-down
v13:
name: postgres v13
run: make -f ci.Makefile ci-postgres14-down
v15:
name: postgres v15
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Build environment and run tests
run: make -f ci.Makefile ci-postgres13-up
run: make -f ci.Makefile ci-postgres15-up
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
files: /tmp/cover.out,/tmp/cover_driver.out
verbose: true
- name: Teardown
run: make -f ci.Makefile ci-postgres13-down
run: make -f ci.Makefile ci-postgres15-down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ make -f ci.Makefile ci-mariadb-up
make -f ci.Makefile ci-mysql57-up
make -f ci.Makefile ci-mysql8-up

make -f ci.Makefile ci-postgres12-up
make -f ci.Makefile ci-postgres13-up
make -f ci.Makefile ci-postgres14-up
make -f ci.Makefile ci-postgres15-up

make -f ci.Makefile ci-sqlite3-up
```
Expand All @@ -184,8 +184,8 @@ make -f ci.Makefile ci-mariadb-down
make -f ci.Makefile ci-mysql57-down
make -f ci.Makefile ci-mysql8-down

make -f ci.Makefile ci-postgres12-down
make -f ci.Makefile ci-postgres13-down
make -f ci.Makefile ci-postgres14-down
make -f ci.Makefile ci-postgres15-down

make -f ci.Makefile ci-sqlite3-down
```
24 changes: 12 additions & 12 deletions ci.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ ci-cassandra4-up: build-base
ci-cassandra4-down:
docker-compose -f $(CASSANDRA_V4_FILE) down --rmi all --volumes

POSTGRES_V12_FILE=$(CI_DIR)/postgres/v12.yml
ci-postgres12-up: build-base
BUILD_DIR=$(BUILD_DIR) docker-compose -f $(POSTGRES_V12_FILE) up --build --exit-code-from client && \
.ci/cp_coverage_to_host.sh $(POSTGRES_V12_FILE)
ci-postgres12-down:
docker-compose -f $(POSTGRES_V12_FILE) down --rmi all --volumes
POSTGRES_V14_FILE=$(CI_DIR)/postgres/v14.yml
ci-postgres14-up: build-base
BUILD_DIR=$(BUILD_DIR) docker-compose -f $(POSTGRES_V14_FILE) up --build --exit-code-from client && \
.ci/cp_coverage_to_host.sh $(POSTGRES_V14_FILE)
ci-postgres14-down:
docker-compose -f $(POSTGRES_V14_FILE) down --rmi all --volumes

POSTGRES_V13_FILE=$(CI_DIR)/postgres/v13.yml
ci-postgres13-up: build-base
BUILD_DIR=$(BUILD_DIR) docker-compose -f $(POSTGRES_V13_FILE) up --build --exit-code-from client && \
.ci/cp_coverage_to_host.sh $(POSTGRES_V13_FILE)
ci-postgres13-down:
docker-compose -f $(POSTGRES_V13_FILE) down --rmi all --volumes
POSTGRES_V15_FILE=$(CI_DIR)/postgres/v15.yml
ci-postgres15-up: build-base
BUILD_DIR=$(BUILD_DIR) docker-compose -f $(POSTGRES_V15_FILE) up --build --exit-code-from client && \
.ci/cp_coverage_to_host.sh $(POSTGRES_V15_FILE)
ci-postgres15-down:
docker-compose -f $(POSTGRES_V15_FILE) down --rmi all --volumes

MARIA_DB_FILE=$(CI_DIR)/mysql/mariadb_v10.yml
ci-mariadb-up: build-base
Expand Down

0 comments on commit 242722e

Please sign in to comment.