Skip to content

Commit

Permalink
Updating min Crystal and postgres versions (#1020)
Browse files Browse the repository at this point in the history
* Updating min Crystal version to 1.10. Also bumping postgres versions we test against

* attempting to install pg client tools to match the server

* Maybe I need to update first?

* Trying to install specific pg client tool versions

* maybe this package will just handle it?

* a little cleanup in the CI since that last update seemed to work

* Updating and ensuring the docker setup runs properly
  • Loading branch information
jwoertink authored Apr 13, 2024
1 parent 87a1ef9 commit ce56ba6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: 1.6.2
crystal: latest
- name: Install shards
run: shards install
- name: Format
Expand All @@ -32,11 +32,11 @@ jobs:
shard_file:
- shard.yml
postgres_version:
- 12
- 13
- 14
- 15
- 16
crystal_version:
- 1.6.2
- 1.10.0
- latest
experimental:
- false
Expand All @@ -63,6 +63,11 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup PostgreSQL Client v${{ matrix.postgres_version }}
uses: tj-actions/install-postgresql@v3
with:
postgresql-version: ${{ matrix.postgres_version }}

- uses: crystal-lang/install-crystal@v1
with:
crystal: ${{matrix.crystal_version}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: "Generate docs"
run: crystal docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
FROM crystallang/crystal:1.6.2
FROM crystallang/crystal:1.10.0
WORKDIR /data

# install base dependencies
RUN apt-get update && \
apt-get install -y gnupg libgconf-2-4 curl libreadline-dev && \
# postgres 11 installation
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" | tee /etc/apt/sources.list.d/postgres.list && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main" | tee /etc/apt/sources.list.d/postgres.list && \
apt-get update && \
apt-get install -y postgresql-11 && \
apt-get install -y postgresql-14 && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Lucky cli
RUN git clone https://github.com/luckyframework/lucky_cli --branch v0.30.0 --depth 1 /usr/local/lucky_cli && \
RUN git clone https://github.com/luckyframework/lucky_cli --branch v1.1.0 --depth 1 /usr/local/lucky_cli && \
cd /usr/local/lucky_cli && \
shards install && \
crystal build src/lucky.cr -o /usr/local/bin/lucky
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"

services:
db:
image: postgres:11.1-alpine
image: postgres:14-alpine
environment:
POSTGRES_USER: lucky
POSTGRES_PASSWORD: developer
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: avram
version: 1.1.1

crystal: ">= 1.6.0"
crystal: ">= 1.10.0"

license: MIT

Expand Down

0 comments on commit ce56ba6

Please sign in to comment.