Skip to content
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

build: Cache images in unit tests #36110

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,13 @@ jobs:
run: |
sudo apt-get update && sudo apt-get install libmysqlclient-dev libxmlsec1-dev lynx

# Try to log into DockerHub so that we're less likely to be rate-limited when pulling certain images.
# This will fail on any edx-platform fork which doesn't explicitly define its own DockerHub creds.
# That's OK--if we fail to log in, we'll proceed anonymously, and hope we don't get rate-limited.
- name: Try to log into Docker Hub
uses: docker/login-action@v3.3.0
continue-on-error: true
# We pull this image a lot, and Dockerhub will rate limit us if we pull too often.
# This is an attempt to cache the image for better performance and to work around that.
# It will cache all pulled images, so if we add new images to this we'll need to update the key.
- name: Cache Docker images
uses: ScribeMD/docker-cache@0.5.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
key: docker-${{ runner.os }}-mongo-${{ matrix.mongo-version }}

- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.11.0
Expand Down
Loading