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

Work/craft 3831 starflow #782

Merged
merged 25 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cf48cfc
chore: add pre-commit-config from starbase
tigarmo Dec 19, 2024
1e148f6
build(snap): use uv to build the snap
tigarmo Dec 19, 2024
ecdb3f6
build: add Makefile and common.mk from starbase
tigarmo Dec 19, 2024
602033b
style: run 'make format'
tigarmo Dec 19, 2024
288843d
chore: add lint and types deps
tigarmo Dec 19, 2024
866ccd2
style(yaml): disable yammlint for now
tigarmo Dec 19, 2024
caf1547
build: fix optional dependencies
tigarmo Dec 19, 2024
77e4f4a
chore: update sphinx-lint call
tigarmo Dec 19, 2024
15bfcaa
chore: fix for lint-twine
tigarmo Dec 20, 2024
6f02e6b
chore(tests): mark >1s tests as slow
tigarmo Dec 20, 2024
7a15d8e
ci: use QA workflows from starflow
tigarmo Dec 20, 2024
1b03525
chore: disable bad linters in sphinx-lint
tigarmo Dec 20, 2024
26268ad
build: don't build on macos
tigarmo Dec 20, 2024
f4f6cb1
build(deps): temporarily restrict craft-app and craft-parts
tigarmo Dec 20, 2024
ef76693
build(tests): install more test dependencies
tigarmo Dec 20, 2024
57d6389
test: fix test on arm64
tigarmo Dec 20, 2024
012b3cd
ci: fix schema diff with uv
tigarmo Dec 20, 2024
e4755c0
ci: disable 'lowest' resolution tests for now
tigarmo Dec 20, 2024
7fee14d
ci: use policy workflow from starbase/starflow
tigarmo Dec 20, 2024
6346177
docs: update build-docs how-to
tigarmo Dec 20, 2024
f696091
ci: pull python-scans changes from charmcraft
tigarmo Dec 20, 2024
d6d8a26
chore: remove unused project files
tigarmo Dec 20, 2024
9744c6e
ci: remove requirements-doc.txt
tigarmo Dec 20, 2024
1a0e9e8
chore(spread): package more files in spread
tigarmo Dec 20, 2024
0f09cf1
build(snap): speed up snap packing
tigarmo Dec 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .bumpversion.cfg

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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:
packages: python-apt-dev
# requirements-noble.txt can't build on jammy
requirements-find-args: '! -name requirements-noble.txt'
osv-extra-args: '--config=source/osv-scanner.toml'
uv-export: false
18 changes: 18 additions & 0 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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:
lowest-python-version: ""
20 changes: 14 additions & 6 deletions .github/workflows/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@ env:

jobs:
diff-schema:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout rockcraft
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up uv with caching
id: setup-uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-suffix: ${{ steps.runner-info.outputs.cache-hash }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install requirements
run: pip install -r requirements.txt

- name: Run generator script
run: ./tools/schema/schema.py > generated_schema.json
run: |
uv run --frozen --no-dev --extra apt-jammy \
python tools/schema/schema.py > generated_schema.json

- name: Check with stored schema
run: |
Expand All @@ -49,4 +55,6 @@ jobs:

- name: Run ajv
run: |
ajv validate -s $ROCKCRAFT_JSON -d docs/reference/code/example/rockcraft.yaml --strict=false --spec=draft2020
ajv validate -s $ROCKCRAFT_JSON \
-d docs/reference/code/example/rockcraft.yaml \
--strict=false --spec=draft2020
16 changes: 0 additions & 16 deletions .github/workflows/security-scan.yaml

This file was deleted.

92 changes: 0 additions & 92 deletions .github/workflows/tests.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v5.0.0"
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-toml
- id: fix-byte-order-marker
- id: mixed-line-ending
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.3"
hooks:
# Run the linter
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter
- id: ruff-format
- repo: https://github.com/adrienverge/yamllint.git
rev: "v1.35.1"
hooks:
- id: yamllint
3 changes: 2 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ sphinx:
# and requirements required to build your docs
python:
install:
- requirements: requirements-doc.txt
- method: pip
path: .
extra_requirements:
- docs
Loading
Loading