Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: v1.0.3
_src_path: https://github.com/trobz/trobz-python-template.git
author_email: doanminhtri8183@gmail.com
author_username: trisdoan
enable_github_action: true
package_name: odoo_addons_path
project_description: Create the ultimate Odoo addons_path constructor
project_name: odoo-addons-path
publish_to_pypi: true
repository_name: odoo-addons-path
repository_namespace: trobz
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: "Setup Python Environment"
description: "Set up Python environment for the given Python version"

inputs:
python-version:
Expand All @@ -9,7 +8,6 @@ inputs:
uv-version:
description: "uv version to use"
required: true
default: "0.6.14"

runs:
using: "composite"
Expand Down
93 changes: 0 additions & 93 deletions .github/workflows/on-release-main.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: pre-commit

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Run checks
run: make check
38 changes: 38 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: publish

on:
release:
types: [published]

permissions:
contents: read

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: write

id-token: write

environment:
name: pypi
url: https://pypi.org/p/odoo-addons-path

steps:
- name: Check out at new tag
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Build Package
run: make build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
packages-dir: dist
36 changes: 36 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release

on:
push:
branches:
- main


permissions:
contents: read

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write

steps:

- name: Checkout Repository on Release Branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- name: Force release branch to be at workflow sha
run: |
git reset --hard ${{ github.sha }}

- name: Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@v10.5.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
30 changes: 5 additions & 25 deletions .github/workflows/main.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
name: Main
name: test

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Set up the environment
uses: ./.github/actions/setup-python-env

- name: Run checks
run: make check

tests-and-type-check:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -44,7 +27,4 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run tests
run: uv run python -m pytest tests

- name: Check typing
run: uv run ty check
run: make test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,6 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/

plans/
repomix-output.xml
7 changes: 1 addition & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ repos:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: check-json
exclude: ^.devcontainer/devcontainer.json
- id: pretty-format-json
exclude: ^.devcontainer/devcontainer.json
args: [--autofix, --no-sort-keys]
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.12.7"
rev: "v0.14.4"
hooks:
- id: ruff-check
args: [ --exit-non-zero-on-fix ]
Expand Down
Loading