-
Notifications
You must be signed in to change notification settings - Fork 22
70 lines (68 loc) · 1.96 KB
/
tests-integration-multipass.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: integration tests
on:
push:
branches:
- "main"
- "feature/*"
- "hotfix/*"
- "release/*"
- "renovate/*"
pull_request:
paths-ignore:
- "tests/unit/**"
- "tests/integration/lxd/**"
- "craft_providers/lxd/**"
- "docs/**"
# Allows triggering the workflow manually from the Actions tab
workflow_dispatch:
inputs:
enable_ssh_access:
type: boolean
description: 'Enable ssh access'
required: false
default: false
jobs:
integration-smoketests-macos:
strategy:
matrix:
python: ["3.11"]
runs-on: macos-latest
steps:
- name: Install Multipass
run: |
brew update
brew install multipass
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Configure environment
run: |
echo "::group::pip install"
python -m pip install 'tox>=4.6'
echo "::endgroup::"
echo "::group::Configure Multipass"
while ! multipass version
do
sleep 1
done
echo "::endgroup::"
- name: Setup Tox environments
run: tox run --colored yes -e integration-smoketests-py${{ matrix.python }} --notest
- name: Enable ssh access
uses: mxschmitt/action-tmate@v3
if: ${{ inputs.enable_ssh_access }}
with:
limit-access-to-actor: true
- name: Run integration smoketests on MacOS
env:
CRAFT_PROVIDERS_TESTS_ENABLE_MULTIPASS_INSTALL: 1
CRAFT_PROVIDERS_TESTS_ENABLE_MULTIPASS_UNINSTALL: 1
PYTEST_ADDOPTS: "--no-header -vv -rN"
run: |
.tox/.tox/bin/tox run --skip-pkg-install --no-list-dependencies --colored yes -e integration-smoketests-py${{ matrix.python }}