Skip to content

Commit

Permalink
Merge branch 'main' into qt-framework
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau authored Jul 16, 2024
2 parents e1c49e5 + fa1043d commit b137eb4
Show file tree
Hide file tree
Showing 512 changed files with 18,663 additions and 6,823 deletions.
15 changes: 6 additions & 9 deletions .github/.jira_sync_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ settings:
components:
- Snapcraft
labels:
- Bug
- Enhancement
- Spike
- Epic
- Triaged
# Adds a comment with the JIRA ID
add_gh_comment: true
# Reflect changes on JIRA
Expand All @@ -16,10 +13,10 @@ settings:
# epic_key: "MTC-296"
jira_project_key: "CRAFT"
status_mapping:
opened: Untriaged
opened: Triaged
closed: done
label_mapping:
Enhancement: Story
Bug: Bug
Spike: Spike
Epic: Epic
enhancement: Story
bug: Bug
spike: Spike
epic: Epic
16 changes: 7 additions & 9 deletions .github/workflows/spread-scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo snap install --dangerous --classic ${{ steps.snapcraft.outputs.snap }}
kernel-plugins:
runs-on: self-hosted
runs-on: [spread-installed]
needs: [snap-build]
strategy:
fail-fast: false
Expand All @@ -52,14 +52,8 @@ jobs:
spread google:ubuntu-22.04-64:tests/spread/plugins/${{ matrix.type }}/kernel
remote-build:
runs-on: self-hosted
runs-on: [spread-installed]
needs: [snap-build]
strategy:
fail-fast: false
matrix:
system:
- ubuntu-20.04-64
- fedora-39-64
steps:
- name: Cleanup job workspace
run: |
Expand All @@ -79,4 +73,8 @@ jobs:
env:
LAUNCHPAD_TOKEN: "${{ secrets.LAUNCHPAD_TOKEN }}"
run: |
spread google:${{ matrix.system }}:tests/spread/general/remote-build
spread google:ubuntu-20.04-64:tests/spread/core20/remote-build-legacy \
google:ubuntu-22.04-64:tests/spread/core22/remote-build-legacy \
google:ubuntu-22.04-64:tests/spread/core22/remote-build \
google:ubuntu-24.04-64:tests/spread/core24/remote-build \
google:fedora-39-64:tests/spread/core24/remote-build:no_platforms
5 changes: 3 additions & 2 deletions .github/workflows/spread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
sudo snap install --dangerous --classic ${{ steps.build-snapcraft.outputs.snap }}
integration-spread-tests:
runs-on: self-hosted
runs-on: [spread-installed]
needs: build
strategy:
# FIXME: enable fail-fast mode once spread can cancel an executing job.
Expand All @@ -40,6 +40,7 @@ jobs:
spread-jobs:
- google:ubuntu-20.04-64
- google:ubuntu-22.04-64
- google:ubuntu-24.04-64

steps:
- name: Checkout snapcraft
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
done
integration-spread-tests-store:
runs-on: self-hosted
runs-on: [spread-installed]
needs: build
strategy:
# FIXME: enable fail-fast mode once spread can cancel an executing job.
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/tics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: TICS

on:
push:
branches:
- main
# to easy test changes to the workflow
- tiobe

jobs:
CI:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install dependencies
run: |
echo "::group::apt-get update"
sudo apt-get update
echo "::endgroup::"
echo "::group::apt-get install..."
sudo apt-get install -y python3 python3-dev libapt-pkg-dev libyaml-dev xdelta3 patchelf
echo "::endgroup::"
echo "::group::pip install"
python -m pip install 'tox<5.0' tox-gh
echo "::endgroup::"
- name: Setup Tox environment
run: tox run-parallel --parallel auto --parallel-no-spinner --parallel-live --colored yes -e test-all-py310 --notest

- name: Test with tox
run: tox run --skip-pkg-install --result-json results/tox-py310.json --colored yes -e test-all-py310

- name: Run TICS analysis
uses: tiobe/tics-github-action@v3
with:
mode: qserver
project: snapcraft
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default
branchdir: ${{ github.workspace }}
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }}
installTics: true
30 changes: 7 additions & 23 deletions .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,12 @@ on:

jobs:
linters:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
echo "::group::Begin snap install"
Expand All @@ -31,7 +27,7 @@ jobs:
sudo apt-get update
echo "::endgroup::"
echo "::group::apt-get install..."
sudo apt-get install --yes libapt-pkg-dev libyaml-dev xdelta3
sudo apt-get install --yes python3 python3-dev libapt-pkg-dev libyaml-dev xdelta3
echo "::endgroup::"
echo "::group::pip install"
python -m pip install 'tox<5.0' tox-gh
Expand All @@ -48,39 +44,27 @@ jobs:
- name: Run Linters
run: tox run --colored yes --skip-pkg-install -m lint
tests:
strategy:
fail-fast: false # Run all the tests to their conclusions.
matrix:
platform: [ubuntu-22.04]
python_version: ["3.10"]
include:
- python_version: "3.10"
tox_python: py310
runs-on: ${{ matrix.platform }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python version ${{ matrix.python_version }} on ${{ matrix.platform }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
echo "::group::apt-get update"
sudo apt-get update
echo "::endgroup::"
echo "::group::apt-get install..."
sudo apt-get install -y libapt-pkg-dev libyaml-dev xdelta3
sudo apt-get install -y python3 python3-dev libapt-pkg-dev libyaml-dev xdelta3
echo "::endgroup::"
echo "::group::pip install"
python -m pip install 'tox<5.0' tox-gh
echo "::endgroup::"
mkdir -p results
- name: Setup Tox environments
run: tox run-parallel --parallel auto --parallel-no-spinner --parallel-live --colored yes -e test-${{ matrix.tox_python }},test-legacy-${{ matrix.tox_python }} --notest
run: tox run-parallel --parallel auto --parallel-no-spinner --parallel-live --colored yes -e test-py310,test-legacy-py310 --notest
- name: Test with tox
run: tox run --skip-pkg-install --result-json results/tox-${{ matrix.platform }}.json --colored yes -e test-${{ matrix.tox_python }},test-legacy-${{ matrix.tox_python }}
run: tox run --skip-pkg-install --result-json results/tox-ubuntu-22.04.json --colored yes -e test-py310,test-legacy-py310
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
Expand All @@ -90,5 +74,5 @@ jobs:
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.platform }}
name: test-results-ubuntu-22.04
path: results/
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ docs/reference.md
docs/reference/commands
docs/.sphinx
docs/_build
docs/common
*.egg-info
.eggs/
.envrc
Expand All @@ -26,6 +27,7 @@ pip-wheel-metadata/
*.pyc
__pycache__
.pytest_cache
*.comp
*.snap
snap/.snapcraft/
.spread-reuse.*
Expand Down
9 changes: 8 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ build:
python: "3.10"
apt_packages:
- libapt-pkg-dev
jobs:
post_checkout:
- git fetch --tags --depth 1 # Also fetch tags
- git describe # Useful for debugging

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -24,4 +28,7 @@ sphinx:
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/sphinx-resources/.sphinx/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
5 changes: 5 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# NOTE: these disables are only necessary while the core24 spread tests are
# being fixed; they refer to unreachable code, unused variable, etc.
# This file must be removed once all tests in tests/spread/core24/ are fixed.
disable=SC2317,SC2034,SC2154

13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ test-black:
test-codespell:
tox run -e lint-codespell

.PHONY: test-isort
test-isort:
tox run -e lint-isort

.PHONY: test-mypy
test-mypy:
tox run -e lint-mypy
Expand All @@ -29,18 +25,13 @@ test-mypy:
test-pydocstyle:
tox run -e lint-docstyle

.PHONY: test-pylint
test-pylint:
tox run -e lint-pylint

.PHONY: test-pyright
test-pyright:
tox run -e lint-pyright

.PHONY: test-ruff
test-ruff:
ruff --config snapcraft_legacy/ruff.toml $(SOURCES_LEGACY)
ruff $(SOURCES)
ruff check

.PHONY: test-shellcheck
test-shellcheck:
Expand All @@ -58,7 +49,7 @@ test-units: test-legacy-units
tests: tests-static test-units

.PHONY: tests-static
tests-static: test-black test-codespell test-ruff test-isort test-mypy test-pydocstyle test-pyright test-pylint test-shellcheck
tests-static: test-black test-codespell test-ruff test-mypy test-pydocstyle test-pyright test-shellcheck

.PHONY: lint
lint: tests-static
30 changes: 15 additions & 15 deletions docs/.sphinx/pinned-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
alabaster==0.7.13
alabaster==0.7.16
Babel==2.11.0
beautifulsoup4==4.11.1
certifi==2023.7.22
certifi==2024.7.4
charset-normalizer==2.1.1
colorama==0.4.6
docutils==0.19
furo==2022.9.29
idna==3.4
furo==2022.12.7
idna==3.7
imagesize==1.4.1
Jinja2==3.1.3
Jinja2==3.1.4
livereload==2.6.3
MarkupSafe==2.1.3
MarkupSafe==2.1.5
packaging==23.2
pyenchant==3.2.2
Pygments==2.15.0
Expand All @@ -22,13 +22,13 @@ snowballstemmer==2.2.0
soupsieve==2.3.2.post1
Sphinx==5.3.0
sphinx-autobuild==2021.3.14
sphinx-basic-ng==1.0.0b1
sphinx_design==0.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinx-basic-ng==1.0.0b2
sphinx_design==0.5.0
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tornado==6.3.3
urllib3==1.26.18
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
tornado==6.4.1
urllib3==1.26.19
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ help:
install:
@echo "... setting up virtualenv"
python3 -m venv sphinx-resources/.sphinx/venv
. $(VENV); pip install --upgrade -r sphinx-resources/.sphinx/requirements.txt -r requirements.txt
. $(VENV); pip install --upgrade -r requirements.txt

@echo "\n" \
"--------------------------------------------------------------- \n" \
Expand Down
File renamed without changes.
Loading

0 comments on commit b137eb4

Please sign in to comment.