-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(ci): add weekly slow tests for macOS
- Loading branch information
Showing
4 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: weekly-tests | ||
on: | ||
pull_request: | ||
|
||
schedule: | ||
# Every Monday at 00:00 UTC | ||
- cron: '0 0 * * 1' | ||
|
||
# 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-macos: | ||
strategy: | ||
matrix: | ||
python: ["3.11"] | ||
runs-on: macos-latest | ||
timeout-minutes: 120 | ||
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-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 tests 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-py${{ matrix.python }} | ||
integration-slow-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-slow-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 slow tests 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-slow-py${{ matrix.python }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters