Skip to content

Commit

Permalink
Merge pull request #1702 from daizhenyu/develop-postgresql-test-fix
Browse files Browse the repository at this point in the history
fix the issue that integration test fails due to the upgrade of the ubuntu environment of gitHub action
  • Loading branch information
lilai23 authored Dec 18, 2024
2 parents 214a423 + a11669d commit c9e8423
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ runs:
- name: install postgresql
shell: bash
run: |
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee /etc/apt/sources.list.d/pgdg.list
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt update
sudo apt install postgresql-14 -y
apt-cache madison postgresql-14
sudo apt install -y postgresql-14
sudo service postgresql start
sudo service postgresql status
sudo -u postgres psql -c "CREATE DATABASE test;"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/Codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ concurrency:
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
java_version: [8]
os: [ubuntu-latest]
os: [ubuntu-22.04]
permissions:
checks: write
contents: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ concurrency:
jobs:
set-execution-conditions:
name: set-execution-conditions
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -44,7 +44,7 @@ jobs:
enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction: ${{ steps.set-outputs.outputs.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction }}
download-midwares-and-cache:
name: download midwares and cache
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: cache zookeeper
Expand All @@ -60,7 +60,7 @@ jobs:
bash ./sermant-integration-tests/scripts/tryDownloadMidware.sh zk
build-agent-and-cache:
name: build agent and cache
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
Expand All @@ -82,7 +82,7 @@ jobs:
mvn package -DskipTests -Ptest --file pom.xml
test-for-database-write-prohibition-mongodb:
name: Test for database-write-prohibition mongodb
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: needs.set-execution-conditions.outputs.enableMongodbDataBaseWriteProhibitionAction == 'true'
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
test-for-database-write-prohibition-mysql:
name: Test for database-write-prohibition mysql
if: needs.set-execution-conditions.outputs.enableMysqlDataBaseWriteProhibitionAction == 'true'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
matrix:
Expand All @@ -148,7 +148,7 @@ jobs:
uses: ./.github/actions/scenarios/database-write-prohibition/mysql
test-for-postgresql:
name: Test for postgresql
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: needs.set-execution-conditions.outputs.enableOpengaussAndPostgresqlDataBaseWriteProhibitionAction == 'true'
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
uses: ./.github/actions/scenarios/database-write-prohibition/postgresql/
test-for-opengauss:
name: Test for opengauss
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: needs.set-execution-conditions.outputs.enableOpengaussDataBaseWriteProhibitionAction == 'true'
needs: [set-execution-conditions, build-agent-and-cache, download-midwares-and-cache]
strategy:
Expand Down

0 comments on commit c9e8423

Please sign in to comment.