Skip to content

Commit

Permalink
Merge pull request #26 from collective/dev
Browse files Browse the repository at this point in the history
Refactor Package with plone/meta - introduce only Plone 6 support
  • Loading branch information
MrTango committed Jun 12, 2024
2 parents 66d7889 + ee910d0 commit 1c2b3f6
Show file tree
Hide file tree
Showing 79 changed files with 1,286 additions and 899 deletions.
49 changes: 45 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
# Generated from:
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
#
# EditorConfig Configuration file, for more details see:
# http://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*]
indent_style = space
# Default settings for all files.
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space
# Max Line Length - a hard line wrap, should be disabled
max_line_length = off

[{*.py,*.cfg}]
[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[{*.html,*.dtml,*.pt,*.zpt,*.xml,*.zcml,*.js}]
[*.{yml,zpt,pt,dtml,zcml,html,xml}]
# 2 space indentation
indent_size = 2

[Makefile]
[*.{json,jsonl,js,jsx,ts,tsx,css,less,scss}]
# Frontend development
# 2 space indentation
indent_size = 2
max_line_length = 80

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset


##
# Add extra configuration options in .meta.toml:
# [editorconfig]
# extra_lines = """
# _your own configuration lines_
# """
##
22 changes: 22 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated from:
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
[flake8]
doctests = 1
ignore =
# black takes care of line length
E501,
# black takes care of where to break lines
W503,
# black takes care of spaces within slicing (list[:])
E203,
# black takes care of spaces after commas
E231,

##
# Add extra configuration options in .meta.toml:
# [flake8]
# extra_lines = """
# _your own configuration lines_
# """
##
35 changes: 0 additions & 35 deletions .github/workflows/black.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Generated from:
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
name: Codecov
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:

jobs:
coveralls:
name: Codecov
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11"]
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install OS packages
if: inputs.os-packages != ''
run: sudo apt-get install -y ${{ inputs.os-packages }}
- name: Cache packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: python -m pip install tox
- name: Initialize tox
run: |
if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi
- name: Run coverage
run: |
tox -q -e coverage >> $GITHUB_STEP_SUMMARY
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/flake8.yml

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Generated from:
# https://github.com/plone/meta/tree/main/config/default
# See the inline comments on how to expand/tweak this configuration file
name: Meta
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
workflow_dispatch:

##
# To set environment variables for all jobs, add in .meta.toml:
# [github]
# env = """
# debug: 1
# image-name: 'org/image'
# image-tag: 'latest'
# """
##

jobs:
qa:
uses: plone/meta/.github/workflows/qa.yml@main
test:
uses: plone/meta/.github/workflows/test.yml@main
coverage:
uses: plone/meta/.github/workflows/coverage.yml@main
dependencies:
uses: plone/meta/.github/workflows/dependencies.yml@main
release_ready:
uses: plone/meta/.github/workflows/release_ready.yml@main
circular:
uses: plone/meta/.github/workflows/circular.yml@main

##
# To modify the list of default jobs being created add in .meta.toml:
# [github]
# jobs = [
# "qa",
# "test",
# "coverage",
# "dependencies",
# "release_ready",
# "circular",
# ]
##

##
# To request that some OS level dependencies get installed
# when running tests/coverage jobs, add in .meta.toml:
# [github]
# os_dependencies = "git libxml2 libxslt"
##

plonetests:
uses: collective/workflow-plonematrix/.github/workflows/plonetest-matrix.yml@main

##
# Specify additional jobs in .meta.toml:
# [github]
# extra_lines = """
# another:
# uses: org/repo/.github/workflows/file.yml@main
# """
##
63 changes: 0 additions & 63 deletions .github/workflows/tests.yml

This file was deleted.

Loading

0 comments on commit 1c2b3f6

Please sign in to comment.