Skip to content

Commit

Permalink
ci(macos): add a macos init/pack smoke test (#1823)
Browse files Browse the repository at this point in the history
Fixes #1767, depends on #1822
  • Loading branch information
lengau authored Aug 19, 2024
1 parent 7aa2965 commit 6f337aa
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,50 @@ jobs:
path: |
dist\charmcraft-installer-self-signed.exe
dist\charmcraft-installer.msix
macos-smoke-test:
strategy:
matrix:
os: [macos-12, macos-13]
runs-on: ${{ matrix.os }}
steps:
# Installing and caching homebrew using the action should speed up subsequent CI:
# https://github.com/Homebrew/actions/tree/master/setup-homebrew
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew Bundler RubyGems
id: cache
uses: actions/cache@v3
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-
- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true'
run: brew install-bundler-gems
- name: Install Multipass
run: |
brew install multipass
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'pip'
- name: Build and install Charmcraft
run: |
pipx install .
- name: Check for fully-configured multipass
run: |
while ! multipass version; do
sleep 1
done
- name: Init and pack
run: |
mkdir test-charm
cd test-charm
export CRAFT_VERBOSITY_LEVEL=trace
charmcraft init --profile=machine
charmcraft pack

0 comments on commit 6f337aa

Please sign in to comment.