Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

Commit 4aa2959

Browse files
authored
fix: Upgrade CLI checks to Mac>10 (#956)
1 parent d70895c commit 4aa2959

1 file changed

Lines changed: 10 additions & 38 deletions

File tree

.github/workflows/cli-tests.yml

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: linux
2626
image: ubuntu-20.04 # Focal Fossa
2727
- name: mac
28-
image: macos-10.15 # Catalina
28+
image: macos-12
2929
python-version:
3030
- '3.8'
3131
fail-fast: false
@@ -50,49 +50,21 @@ jobs:
5050
docker version
5151
docker-compose --version
5252
53-
# Cache boot2docker for speedup and to avoid ratelimiting
54-
- name: Docker cache - Mac
55-
if: ${{ matrix.os.name == 'mac' }}
56-
uses: actions/cache@v2
57-
with:
58-
path: ~/.docker/machine/cache
59-
key: ${{ runner.os }}-docker-machine
60-
61-
# Note: we have to use boot2docker because Docker Desktop has not been licensed
62-
# for use in GithubActions
63-
#
64-
# This also only seems to work for the CLI tests, not the
65-
# provisioning tests, even with apparently identical scripts.
53+
# Note: we cannot use Docker Desktop because it has not been licensed for use in GithubActions
6654
- name: Docker installation - Mac
6755
if: ${{ matrix.os.name == 'mac' }}
6856
run: |
69-
# download an old version of virtualbox (latest is incompatible with github actions)
70-
brew uninstall virtualbox
71-
cd $(brew --repo homebrew/cask)
72-
git checkout 8670a72380c57c606d6582b645421e31dad2eee2
73-
brew install --cask virtualbox
74-
brew install docker docker-machine
75-
76-
docker-machine create --driver virtualbox default
77-
# Apply Docker environment variables to later steps.
78-
#
79-
# However, we first have to extract just the lines beginning
80-
# with 'export ' (skipping any comments) and then reformat
81-
# them so that Github can extract the key/value pairs, that is,
82-
# remove the export and any quotes. This is not safe or
83-
# correct in the general case, but these Docker environment
84-
# variables shouldn't contain newlines or escape sequences.
85-
# This turns output like this:
86-
# export DOCKER_HOST="tcp://192.168.99.100:2376"
87-
# into this:
88-
# DOCKER_HOST=tcp://192.168.99.100:2376
89-
#
90-
# Docs on GITHUB_ENV:
91-
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
92-
docker-machine env default | grep '^export' | sed 's/^export //' | sed 's/"//g' >> $GITHUB_ENV
57+
brew install lima docker
58+
limactl start --name=default template://docker
59+
echo "DOCKER_HOST=unix:///Users/runner/.lima/default/sock/docker.sock" >> $GITHUB_ENV
9360
9461
- name: Install Python dependencies
9562
run: make requirements
9663

64+
# proactively download and extract the image to avoid test timeouts in tests/metrics.py
65+
# this should be moved into a test setup
66+
- name: Pull redis docker image
67+
run: make dev.pull.redis
68+
9769
- name: CLI tests
9870
run: pytest -s ./tests/*.py

0 commit comments

Comments
 (0)