-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mongo
and mongosh
disappeared?
#39
Comments
@scspijker Hey Stijn, you should have either the |
@scspijker @marcuspoehls seeing similar issue - we relied on this giving us
Using mongo:5.0 |
@timmyg Hey Tim, thanks for confirming the issue. @scspijker @timmyg Tim, Stijn, can you please share a link to a failed GitHub Actions job? I need more details on the error and some context in which it fails. |
@marcuspoehls Hi, I made an example repo https://github.com/ringsaturn/mongodb-action-debug for this issue and a sample CI: |
@ringsaturn Thank you for the repo! That helps. You're using Ubuntu 22.04 on that runner. The new 22.04 runners don't have MongoDB installed anymore. MongoDB was available on 20.04, but removed on 22.04. That's the reason you can't use the |
@marcuspoehls Thanks, it’s problem of Ubuntu 22.04 runner not this action. For anyone interested in this problem, please track these issues: |
@ringsaturn Thanks for sharing the links! |
Any ideas on how to work around this? I tried installing mongo: - name: Install mongosh
run: |
sudo apt-get update
sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-mongosh But that didn't help. Still getting This is the whole file name: Run Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
env:
TEST_MONGODB_URI: mongodb://localhost:27017/test
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install mongosh
run: |
sudo apt-get update
sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-mongosh
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: 6.0
- run: yarn install
- run: yarn build
- run: mongo --eval "db.getSiblingDB('test')"
- run: yarn test |
@AdamGerthel Hey Adam, GitHub Action runners using |
Yeah I know - that's what I was trying to fix by adding the "Install mongosh" step.
Ok, I just followed the official install instructions and thought that would work. What would be the way to install mongodb and not mongosh then? |
Your MongoDB installation is missing step 4: sudo apt-get install -y mongodb-org |
Ok, thanks! Still getting the same error nonetheless:
It looks like the install went well, so I'm not sure what the problem is. I've tried using Act to be able to test it locally, but for some reason, I haven't been able to get it working (which seems to be because my repo is private). Any ideas on why |
@AdamGerthel yep, the |
Works - thanks! |
Sweet! |
Since today our builds fail because they can't find the
mongo
ormongosh
clients. This is for both version 1.7.0 and 1.8.0 of this step.Did this step install client software before and has something changes / broken, or did we accidentally get mongo client software from Github Actions itself?
The text was updated successfully, but these errors were encountered: