Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: migrate to starflow #5225

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f705806
style: fix ruff warning
bepri Jan 27, 2025
2c5b2d8
docs: convert README to rst
bepri Jan 27, 2025
7dc2957
build: migrate to pyproject for building with uv
bepri Jan 27, 2025
97b579a
chore: replace black with ruff formatter
bepri Jan 27, 2025
438ef37
build: bring in starbase makefile
bepri Jan 28, 2025
9574400
chore: move data_files and scripts from setup.py into pyproject.toml
bepri Jan 29, 2025
29805f5
build: remove all requirements files and generate requirements with uv
bepri Jan 29, 2025
1b7252a
chore: migrate last of setup.py
bepri Jan 29, 2025
da560c8
chore: remove unused tools
bepri Jan 29, 2025
4afe5dc
build: delete tox.ini
bepri Jan 29, 2025
a2f3bda
chore: organize gitignore
bepri Jan 29, 2025
86b36ff
style: bring in starbase formatter rules
bepri Jan 29, 2025
8abde29
test: mark slow tests
bepri Jan 29, 2025
02a35a5
chore: remove outdated/unused top-level files
bepri Jan 29, 2025
a99ccc0
docs: delete now-obsolete TESTING.md
bepri Jan 29, 2025
f81f681
docs: update HACKING.md with new environment information
bepri Jan 29, 2025
2d8a4c1
build: add python-apt wheels
bepri Jan 29, 2025
dd8aee6
ci: update workflow files for starflow/uv
bepri Jan 29, 2025
d79164e
style: add pre-commit config
bepri Jan 29, 2025
1a4c27e
ci(docs): update readthedocs config to use uv
bepri Jan 30, 2025
e7f4864
chore: correct all typing errors
bepri Jan 30, 2025
ab86c40
style: run prettier
bepri Jan 30, 2025
b687ad4
ci: configure starflow test run
bepri Jan 30, 2025
9a6c73e
chore: fix shellcheck warning on kde neon extension
bepri Jan 30, 2025
b45182f
chore: move docutils into docs dependency group
bepri Jan 30, 2025
7b22826
chore: pin craft-application for test failures
bepri Jan 30, 2025
7a25bf8
fix(docs): properly ignore lines being too long for now
bepri Jan 30, 2025
a5e9cd8
test(spread): remove nonexistent files from spread.yaml
bepri Jan 30, 2025
4df5913
ci: make trivy ignore things we don't need to scan
bepri Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ body:
id: additional-context
attributes:
label: Additional context

6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- [ ] Have you followed the [guidelines for contributing](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md)?
- [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `tox run -m lint`?
- [ ] Have you successfully run `tox run -e test-py310`? (supported versions: `py39`, `py310`, `py311`, `py312`)
- [ ] Have you successfully run `make lint`?
- [ ] Have you successfully run `make test`?

-----
---
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ categories:
- title: "Tooling"
label:
- "tooling"
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
template: |
Special thanks to the contributors that made this release happen: $CONTRIBUTORS

## Full list of changes

$CHANGES
20 changes: 10 additions & 10 deletions .github/spread-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"problemMatcher": [
"problemMatcher": [
{
"owner": "spread-error",
"pattern": [
{
"owner": "spread-error",
"pattern": [
{
"regexp": "^\\d+-\\d+-\\d+ \\d+:\\d+:\\d+ ((Error) (preparing|executing|restoring) .+) : .*$",
"message": 1,
"severity": 2
}
]
"regexp": "^\\d+-\\d+-\\d+ \\d+:\\d+:\\d+ ((Error) (preparing|executing|restoring) .+) : .*$",
"message": 1,
"severity": 2
}
]
]
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/check-renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
inputs:
enable_ssh_access:
type: boolean
description: 'Enable ssh access'
description: "Enable ssh access"
required: false
default: false

Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/cla-check.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check policy
on:
pull_request:
push:
branches:
- main
- hotfix/*
- work/check-policy # For development

jobs:
policy:
uses: canonical/starflow/.github/workflows/policy.yaml@main
python-scans:
name: Security scan
uses: canonical/starflow/.github/workflows/scan-python.yaml@main
with:
# 1. requirements-noble.txt can't build on jammy
# 2. Ignore requirements files in spread tests, as some of these intentionally
# contain vulnerable versions.
# 3. Docs contain requirements.txt files that don't specify versions.
requirements-find-args: '! -name requirements-noble.txt ! -path "./tests/spread*" ! -path "./docs/**"'
trivy-extra-args: "--severity HIGH,CRITICAL --ignore-unfixed --skip-dirs tests/spread/"
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on:
on:
pull_request:
push:
branches:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: QA
on:
push:
branches:
- "main"
- "feature/*"
- "hotfix/*"
- "release/*"
- "renovate/*"
pull_request:

jobs:
lint:
uses: canonical/starflow/.github/workflows/lint-python.yaml@main
test:
uses: canonical/starflow/.github/workflows/test-python.yaml@main
with:
# Snapcraft currently only tests on Python 3.12 on Ubuntu 24.04
fast-test-platforms: '["ubuntu-24.04"]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sergiusens should we be using self-hosted runners for this or GH-hosted ones?

slow-test-platforms: '["ubuntu-24.04"]'
lowest-python-platform: "ubuntu-24.04"
fast-test-python-versions: '["3.12"]'
slow-test-python-versions: '["3.12"]'
lowest-python-version: "3.12"
17 changes: 0 additions & 17 deletions .github/workflows/security-scan.yaml

This file was deleted.

36 changes: 23 additions & 13 deletions .github/workflows/tics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: TICS
on:
push:
branches:
- main
# to easy test changes to the workflow
- tiobe
- main
# to easy test changes to the workflow
- tiobe

jobs:
CI:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,22 +22,32 @@ jobs:
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
sudo apt-get install -y python3 python3-dev libapt-pkg-dev libyaml-dev umoci
echo "::endgroup::"
echo "::group::pip install"
python -m pip install 'tox<5.0' tox-gh
echo "::group::snap install"
sudo snap install --classic astral-uv
echo "::endgroup::"
echo "::group::install requirements"
uv sync --frozen --group dev
echo "::endgroup::"

- name: Setup Tox environment
run: tox --workdir /tmp/tox run-parallel --parallel auto --parallel-no-spinner --parallel-live --colored yes -e test-all-py310 --notest
- name: Install project
run: |
python -m pip install -e .

- name: Test with tox
run: tox --workdir /tmp/tox run --skip-pkg-install --result-json results/tox-py310.json --colored yes -e test-all-py310
- name: Run coverage
run: |
make test-coverage

- name: Upload test results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: test-results-ubuntu-24.04
path: results/

- name: Run TICS analysis
uses: tiobe/tics-github-action@v3
env:
PATH: "/tmp/tox/test-all-py310/bin:/snap/bin:/home/runner/.local/bin:/home/runner/.cargo/bin:/bin:/usr/bin:/usr/local/bin:"
with:
mode: qserver
project: snapcraft
Expand Down
78 changes: 0 additions & 78 deletions .github/workflows/tox.yaml

This file was deleted.

Loading
Loading