From 1ae7e42175735066127e01b75f2ec12a4e1bd4d4 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Wed, 10 Apr 2024 09:47:13 -0700 Subject: [PATCH 1/7] Updating min Crystal version to 1.10. Also bumping postgres versions we test against --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/docs.yml | 2 +- shard.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5120310dd..8c46993d2 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 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/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 From 27fe4572580e22e6768d323ff3831f56f0730523 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Wed, 10 Apr 2024 10:13:44 -0700 Subject: [PATCH 2/7] attempting to install pg client tools to match the server --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c46993d2..580d348c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,8 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v4 + - name: Install pg_client tools + run: sudo apt install postgresql-client-${{ matrix.postgres_version }} -y - uses: crystal-lang/install-crystal@v1 with: crystal: ${{matrix.crystal_version}} From 0e24ce340a7cbd5cd4f044d7eb836d1a9e74442a Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Wed, 10 Apr 2024 10:17:23 -0700 Subject: [PATCH 3/7] Maybe I need to update first? --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 580d348c4..4ceac7a16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,10 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install pg_client tools - run: sudo apt install postgresql-client-${{ matrix.postgres_version }} -y + run: | + sudo apt-get update + sudo apt install postgresql-client-${{ matrix.postgres_version }} -y + - uses: crystal-lang/install-crystal@v1 with: crystal: ${{matrix.crystal_version}} From 2dc915f58acd0d667b89b5e5e3a76e86be5085d5 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Sat, 13 Apr 2024 09:24:00 -0700 Subject: [PATCH 4/7] Trying to install specific pg client tool versions --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ceac7a16..7b4dd9971 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,9 +63,11 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Install pg_client tools + - name: Install pg_client tools v${{ matrix.postgres_version }} run: | + sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' sudo apt-get update + curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg sudo apt install postgresql-client-${{ matrix.postgres_version }} -y - uses: crystal-lang/install-crystal@v1 From 90318f3339a1b3b65bbbf82d907b27166fa62686 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Sat, 13 Apr 2024 09:32:09 -0700 Subject: [PATCH 5/7] maybe this package will just handle it? --- .github/workflows/ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b4dd9971..c0a24fa5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,12 +63,16 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Install pg_client tools v${{ matrix.postgres_version }} - run: | - sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - sudo apt-get update - curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg - sudo apt install postgresql-client-${{ matrix.postgres_version }} -y + - name: Setup PostgreSQL + uses: tj-actions/install-postgresql@v3 + with: + postgresql-version: ${{ matrix.postgres_version }} + # - name: Install pg_client tools v${{ matrix.postgres_version }} + # run: | + # sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + # sudo apt-get update + # curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg + # sudo apt install postgresql-client-${{ matrix.postgres_version }} -y - uses: crystal-lang/install-crystal@v1 with: From a9653f8af17f26b27236e31605af902c78ddae6f Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Sat, 13 Apr 2024 09:40:37 -0700 Subject: [PATCH 6/7] a little cleanup in the CI since that last update seemed to work --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0a24fa5c..0c6f61448 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,16 +63,10 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v4 - - name: Setup PostgreSQL + - name: Setup PostgreSQL Client v${{ matrix.postgres_version }} uses: tj-actions/install-postgresql@v3 with: postgresql-version: ${{ matrix.postgres_version }} - # - name: Install pg_client tools v${{ matrix.postgres_version }} - # run: | - # sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - # sudo apt-get update - # curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg - # sudo apt install postgresql-client-${{ matrix.postgres_version }} -y - uses: crystal-lang/install-crystal@v1 with: From 3a1767da5e741d43643040486b338e7249b9e480 Mon Sep 17 00:00:00 2001 From: Jeremy Woertink Date: Sat, 13 Apr 2024 09:48:47 -0700 Subject: [PATCH 7/7] Updating and ensuring the docker setup runs properly --- Dockerfile | 8 ++++---- docker-compose.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) 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