From 9dcdbe35ff330e11fda494c604fe891f5e43feb9 Mon Sep 17 00:00:00 2001 From: nyaruta Date: Tue, 6 May 2025 07:18:07 +0800 Subject: [PATCH 1/2] fix: test ci --- .../actions/setup-databases-binary/action.yml | 22 +++++++++++++++++++ .github/workflows/ci.yml | 7 ++++++ pnpm-workspace.yaml | 9 ++++++++ 3 files changed, 38 insertions(+) create mode 100644 .github/actions/setup-databases-binary/action.yml diff --git a/.github/actions/setup-databases-binary/action.yml b/.github/actions/setup-databases-binary/action.yml new file mode 100644 index 00000000000..b58af4efa58 --- /dev/null +++ b/.github/actions/setup-databases-binary/action.yml @@ -0,0 +1,22 @@ +name: Install MongoDB and Redis Binaries +description: 'Install MongoDB and Redis binaries for testing' + +runs: + using: 'composite' + steps: + - name: Install MongoDB + shell: bash + run: | + sudo apt-get install gnupg curl + curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | \ + sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg \ + --dearmor + echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" | \ + sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list + sudo apt-get update + sudo apt-get install -y mongodb-org + + - name: Install Redis + shell: bash + run: | + sudo apt-get install -y redis-server \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f78db47ca29..1ea62f6c3a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,6 +73,11 @@ jobs: name: Test timeout-minutes: 10 runs-on: ubuntu-latest + env: + REDISMS_SYSTEM_BINARY: /usr/bin/redis-server + REDISMS_DISABLE_POSTINSTALL: 1 + MONGOMS_SYSTEM_BINARY: /usr/bin/mongod + MONGOMS_DISABLE_POSTINSTALL: 1 steps: - name: Checkout uses: actions/checkout@v4 @@ -80,6 +85,8 @@ jobs: uses: ./.github/actions/setup-node with: node-version: '22.x' + - name: Setup MongoDB and Redis Binaries + uses: ./.github/actions/setup-databases-binary - name: Setup MongoDB and Redis uses: ./.github/actions/setup-databases - name: Run Lint diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index ceb0baef986..04c1514a92c 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -140,3 +140,12 @@ catalog: zod: 3.24.3 zx: 7.2.3 zx-cjs: 7.0.7-0 +ignoredBuiltDependencies: + - mongodb-memory-server + - redis-memory-server +onlyBuiltDependencies: + - '@nestjs/core' + - '@swc/core' + - esbuild + - sharp + - simple-git-hooks From a5952c7aaf17c874a31f1e10dfa0994b794329e5 Mon Sep 17 00:00:00 2001 From: nyaruta Date: Tue, 6 May 2025 07:21:38 +0800 Subject: [PATCH 2/2] fix --- .github/actions/setup-databases-binary/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-databases-binary/action.yml b/.github/actions/setup-databases-binary/action.yml index b58af4efa58..2fbcbc9dbf0 100644 --- a/.github/actions/setup-databases-binary/action.yml +++ b/.github/actions/setup-databases-binary/action.yml @@ -19,4 +19,6 @@ runs: - name: Install Redis shell: bash run: | - sudo apt-get install -y redis-server \ No newline at end of file + sudo apt-get install -y redis-server + sudo systemctl disable redis.service --now + sudo systemctl disable redis-server.service --now \ No newline at end of file