From ce56ba6433bb6ffb19a06850ffe59725b2b78462 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Sat, 13 Apr 2024 09:58:24 -0700 Subject: [PATCH] Updating min Crystal and postgres versions (#1020) * 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 --- .github/workflows/ci.yml | 13 +++++++++---- .github/workflows/docs.yml | 2 +- Dockerfile | 8 ++++---- docker-compose.yml | 2 +- shard.yml | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5120310dd..0c6f61448 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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}} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2b9d39ea4..066291db2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 41c8a4823..1fdd649c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM crystallang/crystal:1.6.2 +FROM crystallang/crystal:1.10.0 WORKDIR /data # install base dependencies @@ -6,13 +6,13 @@ 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 diff --git a/docker-compose.yml b/docker-compose.yml index 509cb1c92..29cf0a5c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: db: - image: postgres:11.1-alpine + image: postgres:14-alpine environment: POSTGRES_USER: lucky POSTGRES_PASSWORD: developer diff --git a/shard.yml b/shard.yml index 2c489cefd..6f197ca1f 100644 --- a/shard.yml +++ b/shard.yml @@ -1,7 +1,7 @@ name: avram version: 1.1.1 -crystal: ">= 1.6.0" +crystal: ">= 1.10.0" license: MIT