-
-
Notifications
You must be signed in to change notification settings - Fork 689
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experiment with running testbed with Textual
- Loading branch information
Showing
4 changed files
with
200 additions
and
157 deletions.
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 |
---|---|---|
|
@@ -30,166 +30,176 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-commit checks | ||
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main | ||
with: | ||
pre-commit-source: "./core[dev]" | ||
|
||
towncrier: | ||
name: Check towncrier | ||
uses: beeware/.github/.github/workflows/towncrier-run.yml@main | ||
with: | ||
tox-source: "./core[dev]" | ||
|
||
package: | ||
name: Package Toga | ||
permissions: | ||
id-token: write | ||
contents: read | ||
attestations: write | ||
strategy: | ||
matrix: | ||
subdir: | ||
- "android" | ||
- "cocoa" | ||
- "core" | ||
- "demo" | ||
- "dummy" | ||
- "gtk" | ||
- "iOS" | ||
- "toga" | ||
- "textual" | ||
- "web" | ||
- "winforms" | ||
uses: beeware/.github/.github/workflows/python-package-create.yml@main | ||
with: | ||
build-subdirectory: ${{ matrix.subdir }} | ||
attest: ${{ inputs.attest-package }} | ||
|
||
core: | ||
name: Test core | ||
runs-on: ${{ matrix.platform }} | ||
needs: [ pre-commit, towncrier, package ] | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ "macos-12", "macos-14", "ubuntu-latest", "windows-latest" ] | ||
python-version: [ "3.8", "3.12", "3.13-dev" ] | ||
include: | ||
- experimental: false | ||
# Test Python 3.9-3.11 on Ubuntu only | ||
- platform: "ubuntu-latest" | ||
python-version: "3.9" | ||
experimental: false | ||
- platform: "ubuntu-latest" | ||
python-version: "3.10" | ||
experimental: false | ||
- platform: "ubuntu-latest" | ||
python-version: "3.11" | ||
experimental: false | ||
# Allow development Python to fail without failing entire job. | ||
- python-version: "3.13-dev" | ||
experimental: true | ||
exclude: | ||
# macos-14 (i.e. arm64) does not support Python 3.8 | ||
- platform: "macos-14" | ||
python-version: "3.8" | ||
# Pillow isn't available for Python 3.13 on Windows | ||
- platform: "windows-latest" | ||
python-version: "3.13-dev" | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Tox | ||
uses: beeware/.github/.github/actions/install-requirement@main | ||
with: | ||
requirements: tox | ||
extra: dev | ||
project-root: core | ||
|
||
- name: Get Packages | ||
uses: actions/[email protected] | ||
with: | ||
pattern: ${{ format('{0}-*', needs.package.outputs.artifact-basename) }} | ||
merge-multiple: true | ||
path: dist | ||
|
||
- name: Test | ||
run: | | ||
# The $(ls ...) shell expansion is done in the Github environment; | ||
# the value of TOGA_INSTALL_COMMAND will be a literal string without any shell expansions to perform | ||
TOGA_INSTALL_COMMAND="python -m pip install ../$(ls dist/toga_core-*.whl)[dev] ../$(ls dist/toga_dummy-*.whl)" \ | ||
tox -e py-cov | ||
tox -qe coverage$(tr -dc "0-9" <<< "${{ matrix.python-version }}") | ||
mv core/.coverage core/.coverage.${{ matrix.platform }}.${{ matrix.python-version }} | ||
- name: Store Coverage Data | ||
uses: actions/[email protected] | ||
with: | ||
name: core-coverage-data-${{ matrix.platform }}-${{ matrix.python-version }} | ||
path: "core/.coverage.*" | ||
if-no-files-found: error | ||
include-hidden-files: true | ||
|
||
core-coverage: | ||
name: Coverage | ||
needs: core | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ env.min_python_version }} | ||
uses: actions/[email protected] | ||
with: | ||
# Use minimum version of python for coverage to avoid phantom branches | ||
# https://github.com/nedbat/coveragepy/issues/1572#issuecomment-1522546425 | ||
python-version: ${{ env.min_python_version }} | ||
|
||
- name: Install Tox | ||
uses: beeware/.github/.github/actions/install-requirement@main | ||
with: | ||
requirements: tox | ||
extra: dev | ||
project-root: core | ||
|
||
- name: Retrieve Coverage Data | ||
uses: actions/[email protected] | ||
with: | ||
pattern: core-coverage-data-* | ||
path: core | ||
merge-multiple: true | ||
|
||
- name: Generate Coverage Report | ||
run: tox -e coverage-html-fail-platform | ||
|
||
- name: Upload HTML Coverage Report | ||
uses: actions/[email protected] | ||
if: failure() | ||
with: | ||
name: html-coverage-report | ||
path: core/htmlcov | ||
# pre-commit: | ||
# name: Pre-commit checks | ||
# uses: beeware/.github/.github/workflows/pre-commit-run.yml@main | ||
# with: | ||
# pre-commit-source: "./core[dev]" | ||
# | ||
# towncrier: | ||
# name: Check towncrier | ||
# uses: beeware/.github/.github/workflows/towncrier-run.yml@main | ||
# with: | ||
# tox-source: "./core[dev]" | ||
# | ||
# package: | ||
# name: Package Toga | ||
# permissions: | ||
# id-token: write | ||
# contents: read | ||
# attestations: write | ||
# strategy: | ||
# matrix: | ||
# subdir: | ||
# - "android" | ||
# - "cocoa" | ||
# - "core" | ||
# - "demo" | ||
# - "dummy" | ||
# - "gtk" | ||
# - "iOS" | ||
# - "toga" | ||
# - "textual" | ||
# - "web" | ||
# - "winforms" | ||
# uses: beeware/.github/.github/workflows/python-package-create.yml@main | ||
# with: | ||
# build-subdirectory: ${{ matrix.subdir }} | ||
# attest: ${{ inputs.attest-package }} | ||
|
||
# core: | ||
# name: Test core | ||
# runs-on: ${{ matrix.platform }} | ||
# needs: [ pre-commit, towncrier, package ] | ||
# continue-on-error: ${{ matrix.experimental }} | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# platform: [ "macos-12", "macos-14", "ubuntu-latest", "windows-latest" ] | ||
# python-version: [ "3.8", "3.12", "3.13-dev" ] | ||
# include: | ||
# - experimental: false | ||
# # Test Python 3.9-3.11 on Ubuntu only | ||
# - platform: "ubuntu-latest" | ||
# python-version: "3.9" | ||
# experimental: false | ||
# - platform: "ubuntu-latest" | ||
# python-version: "3.10" | ||
# experimental: false | ||
# - platform: "ubuntu-latest" | ||
# python-version: "3.11" | ||
# experimental: false | ||
# # Allow development Python to fail without failing entire job. | ||
# - python-version: "3.13-dev" | ||
# experimental: true | ||
# exclude: | ||
# # macos-14 (i.e. arm64) does not support Python 3.8 | ||
# - platform: "macos-14" | ||
# python-version: "3.8" | ||
# # Pillow isn't available for Python 3.13 on Windows | ||
# - platform: "windows-latest" | ||
# python-version: "3.13-dev" | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/[email protected] | ||
# with: | ||
# fetch-depth: 0 | ||
# | ||
# - name: Set up Python ${{ matrix.python-version }} | ||
# uses: actions/[email protected] | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# | ||
# - name: Install Tox | ||
# uses: beeware/.github/.github/actions/install-requirement@main | ||
# with: | ||
# requirements: tox | ||
# extra: dev | ||
# project-root: core | ||
# | ||
# - name: Get Packages | ||
# uses: actions/[email protected] | ||
# with: | ||
# pattern: ${{ format('{0}-*', needs.package.outputs.artifact-basename) }} | ||
# merge-multiple: true | ||
# path: dist | ||
# | ||
# - name: Test | ||
# run: | | ||
# # The $(ls ...) shell expansion is done in the Github environment; | ||
# # the value of TOGA_INSTALL_COMMAND will be a literal string without any shell expansions to perform | ||
# TOGA_INSTALL_COMMAND="python -m pip install ../$(ls dist/toga_core-*.whl)[dev] ../$(ls dist/toga_dummy-*.whl)" \ | ||
# tox -e py-cov | ||
# tox -qe coverage$(tr -dc "0-9" <<< "${{ matrix.python-version }}") | ||
# mv core/.coverage core/.coverage.${{ matrix.platform }}.${{ matrix.python-version }} | ||
# | ||
# - name: Store Coverage Data | ||
# uses: actions/[email protected] | ||
# with: | ||
# name: core-coverage-data-${{ matrix.platform }}-${{ matrix.python-version }} | ||
# path: "core/.coverage.*" | ||
# if-no-files-found: error | ||
# include-hidden-files: true | ||
# | ||
# core-coverage: | ||
# name: Coverage | ||
# needs: core | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/[email protected] | ||
# with: | ||
# fetch-depth: 0 | ||
# | ||
# - name: Set up Python ${{ env.min_python_version }} | ||
# uses: actions/[email protected] | ||
# with: | ||
# # Use minimum version of python for coverage to avoid phantom branches | ||
# # https://github.com/nedbat/coveragepy/issues/1572#issuecomment-1522546425 | ||
# python-version: ${{ env.min_python_version }} | ||
# | ||
# - name: Install Tox | ||
# uses: beeware/.github/.github/actions/install-requirement@main | ||
# with: | ||
# requirements: tox | ||
# extra: dev | ||
# project-root: core | ||
# | ||
# - name: Retrieve Coverage Data | ||
# uses: actions/[email protected] | ||
# with: | ||
# pattern: core-coverage-data-* | ||
# path: core | ||
# merge-multiple: true | ||
# | ||
# - name: Generate Coverage Report | ||
# run: tox -e coverage-html-fail-platform | ||
# | ||
# - name: Upload HTML Coverage Report | ||
# uses: actions/[email protected] | ||
# if: failure() | ||
# with: | ||
# name: html-coverage-report | ||
# path: core/htmlcov | ||
|
||
testbed: | ||
name: Testbed | ||
needs: core | ||
# needs: core | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
backend: [ "macOS-x86_64", "macOS-arm64", "windows", "linux-x11", "linux-wayland","android", "iOS" ] | ||
backend: | ||
- "macOS-x86_64" | ||
- "macOS-arm64" | ||
- "windows" | ||
- "linux-x11" | ||
- "linux-wayland" | ||
- "android" | ||
- "iOS" | ||
- "textual-linux" | ||
- "textual-macOS" | ||
- "textual-windows" | ||
include: | ||
- pre-command: "" | ||
briefcase-run-prefix: "" | ||
|
@@ -265,6 +275,25 @@ jobs: | |
setup-python: false # Use the system Python packages | ||
app-user-data-path: "$HOME/.local/share/testbed" | ||
|
||
- backend: "textual-linux" | ||
platform: "linux" | ||
runs-on: "ubuntu-22.04" | ||
setup-python: false # Use the system Python packages | ||
briefcase-run-args: --config 'requires=["../core","../textual"]' --config 'console_app=true' | ||
app-user-data-path: "$HOME/.local/share/testbed" | ||
|
||
- backend: "textual-macOS" | ||
platform: "macOS" | ||
runs-on: "macos-14" | ||
briefcase-run-args: --config 'requires=["../core","../textual"]' --config 'console_app=true' | ||
app-user-data-path: "$HOME/Library/Application Support/org.beeware.toga.testbed" | ||
|
||
- backend: "textual-windows" | ||
platform: "windows" | ||
runs-on: "windows-latest" | ||
briefcase-run-args: --config 'requires=["../core","../textual"]' --config 'console_app=true' | ||
app-user-data-path: '$HOME\AppData\Local\Tiberius Yak\Toga Testbed\Data' | ||
|
||
- backend: "windows" | ||
platform: "windows" | ||
runs-on: "windows-latest" | ||
|
@@ -274,7 +303,7 @@ jobs: | |
platform: "iOS" | ||
runs-on: "macos-14" | ||
# As of early April 2024, the XCode 15/iOS 17 simulator had a performance | ||
# issue that rendered Github Actions testing impossible. The issue didn't | ||
# issue that rendered GitHub Actions testing impossible. The issue didn't | ||
# impact iOS 16.4, but that required the use of Xcode 14.3.1. | ||
# | ||
# Refs #2476, actions/runner-images#9591. | ||
|
@@ -301,7 +330,7 @@ jobs: | |
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
steps: | ||
# Github runners seem to have intermittent connectivity issues. | ||
# GitHub runners seem to have intermittent connectivity issues. | ||
# See https://github.com/beeware/toga/issues/2632 | ||
- name: Tune GitHub-hosted runner network | ||
uses: smorimoto/[email protected] | ||
|
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
Oops, something went wrong.