From e43d86418433ffdc74594417a069cd27d30445a8 Mon Sep 17 00:00:00 2001 From: Badlop Date: Tue, 1 Apr 2025 15:39:17 +0200 Subject: [PATCH] CI: Bump ubuntu-24.04, and Erlang 25+ (#4281) Update postgresql preparation: - ubuntu-20.04 included PostgreSQL 14.13 - ubuntu-24.04 includes PostgreSQL 16.4 and in the meantime, PostgreSQL 15.0 revoked "the CREATE permission from all users except a database owner from the public (or default) schema." See https://www.postgresql.org/about/news/postgresql-15-released-2526/ --- .github/workflows/ci.yml | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86fffe591..fafa6eb65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,8 @@ jobs: strategy: fail-fast: false matrix: - otp: ['20.0', '25', '26', '27'] - runs-on: ubuntu-20.04 + otp: ['25', '26', '27'] + runs-on: ubuntu-24.04 services: redis: image: public.ecr.aws/docker/library/redis @@ -50,13 +50,6 @@ jobs: with: otp-version: ${{ matrix.otp }} - - name: Get a compatible Rebar3 - if: matrix.otp < 24 - run: | - rm rebar3 - wget https://github.com/processone/ejabberd/raw/21.12/rebar3 - chmod +x rebar3 - - name: Install MS SQL Server run: | docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=ejabberd_Test1" \ @@ -83,6 +76,8 @@ jobs: WITH PASSWORD 'ejabberd_test';" sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE ejabberd_test TO ejabberd_test;" + sudo -u postgres psql -c "GRANT ALL ON SCHEMA public TO ejabberd_test;" + sudo -u postgres psql -c "ALTER DATABASE ejabberd_test OWNER TO ejabberd_test;" sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ejabberd_test;" @@ -107,10 +102,6 @@ jobs: ~/.cache/rebar3/ key: ${{matrix.otp}}-${{hashFiles('rebar.config')}} - - name: Get old eredis for old Erlang - if: matrix.otp < 21 - run: ./rebar3 unlock eredis - - name: Compile run: | ./autogen.sh @@ -129,7 +120,6 @@ jobs: - run: make dialyzer - run: make test-eunit - run: make elvis - if: matrix.otp >= 23 - name: Check Production Release run: | @@ -267,6 +257,8 @@ jobs: sudo -u postgres psql -c "CREATE DATABASE ejabberd_test;" sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE ejabberd_test TO ejabberd_test;" + sudo -u postgres psql -c "GRANT ALL ON SCHEMA public TO ejabberd_test;" + sudo -u postgres psql -c "ALTER DATABASE ejabberd_test OWNER TO ejabberd_test;" sudo -u postgres psql ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ejabberd_test;"