diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 6885359..341d399 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -21,11 +21,6 @@ jobs: playwright: runs-on: ubuntu-latest needs: vitest - services: - mongo: - image: mongo:7 - ports: - - 27017:27017 env: MONGODB_URI: mongodb://localhost:27017/ghostguild-test JWT_SECRET: ci-test-jwt-secret @@ -43,6 +38,10 @@ jobs: cache: npm - run: npm ci - run: npx playwright install --with-deps chromium + - name: Start MongoDB + run: docker run -d --name mongo-ci -p 27017:27017 mongo:7 + - name: Wait for MongoDB + run: timeout 30 sh -c 'until nc -z localhost 27017; do sleep 1; done' - run: npm run build - name: Start server run: node .output/server/index.mjs > /tmp/server.log 2>&1 & @@ -79,11 +78,6 @@ jobs: runs-on: ubuntu-latest needs: vitest continue-on-error: true - services: - mongo: - image: mongo:7 - ports: - - 27017:27017 env: MONGODB_URI: mongodb://localhost:27017/ghostguild-test JWT_SECRET: ci-test-jwt-secret @@ -101,6 +95,10 @@ jobs: cache: npm - run: npm ci - run: npx playwright install --with-deps chromium + - name: Start MongoDB + run: docker run -d --name mongo-ci -p 27017:27017 mongo:7 + - name: Wait for MongoDB + run: timeout 30 sh -c 'until nc -z localhost 27017; do sleep 1; done' - run: npm run build - name: Start server run: node .output/server/index.mjs > /tmp/server.log 2>&1 &