weekly-tests #28
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
name: weekly-tests | |
on: | |
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: | |
fail-fast: false | |
matrix: | |
python: ["3.11"] | |
os: [macos-13] | |
runs-on: ${{ matrix.os }} | |
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@v5 | |
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: | |
fail-fast: false | |
matrix: | |
python: ["3.11"] | |
os: [macos-13] | |
runs-on: ${{ matrix.os }} | |
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@v5 | |
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 }} |