Skip to content

Commit

Permalink
[MISC] Only autorelease on rockcraft yaml (#54)
Browse files Browse the repository at this point in the history
* Only autorelease on rockcraft yaml

* Switch to shared linter

* Use the team for reviews

* Switch to poetry for dep management
  • Loading branch information
dragomirp authored Aug 22, 2024
1 parent d66b6a1 commit a51b62a
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>canonical/data-platform//renovate_presets/charm.json5"],
"reviewers": ["dragomirp", "lucasgameiroborges", "marceloneppel", "taurus-forever"],
"reviewers": ["team:data-platform-postgresql"],
}
10 changes: 1 addition & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tox
run: pipx install tox
- name: Run linters
run: tox run -e lint
uses: canonical/data-platform-workflows/.github/workflows/[email protected]

build:
name: Build rock
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
push:
branches:
- 14-22.04
paths:
- rockcraft.yaml
workflow_dispatch:

jobs:
Expand Down
97 changes: 97 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.

[tool.poetry]
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.group.format]
optional = true

[tool.poetry.group.format.dependencies]

[tool.poetry.group.lint]
optional = true

[tool.poetry.group.lint.dependencies]
yamllint = "^1.35.1"

20 changes: 12 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
[tox]
requires =
tox>=4
no_package = True
env_list = lint

[testenv]
setenv =
name=charmed-postgresql
registry_namespace=ghcr.io/canonical
repo=https://github.com/canonical/postgresql-k8s-operator.git
allowlist_externals =
poetry

[testenv:lint]
description = run linters
skip_install = true
deps =
yamllint
commands =
yamllint --no-warnings rockcraft.yaml
description = Check code against coding style standards
allowlist_externals =
{[testenv]allowlist_externals}
find
commands_pre =
poetry install --only lint,format --no-root
commands =
poetry check --lock
yamllint --no-warnings rockcraft.yaml

0 comments on commit a51b62a

Please sign in to comment.