Skip to content

Commit 5c0bd25

Browse files
author
Alan Christie
committed
feat: Experiment with CI and build
1 parent 8f7e04f commit 5c0bd25

File tree

8 files changed

+263
-3
lines changed

8 files changed

+263
-3
lines changed

.cz.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
# Commitizen custom configuration.
3+
# Here we extend it to add all our recognised types into the changelog.
4+
# The default ignores pretty-much anything other than 'feat' and 'fix'.
5+
#
6+
# See the default at...
7+
# https://github.com/commitizen-tools/commitizen/
8+
# blob/095f02e6c419b60c90aa84b8cebc9e9eacc8a391/commitizen/defaults.py#L83
9+
commitizen:
10+
name: cz_customize
11+
customize:
12+
schema_pattern: "^(?P<change_type>feat|fix|perf|refactor|remove|style|test|build|docs|chore|ci|BREAKING CHANGE)(?:\\((?P<scope>[^()\\r\\n]*)\\)|\\()?(?P<breaking>!)?:\\s(?P<message>.*)?"
13+
commit_parser: "^(?P<change_type>feat|fix|perf|refactor|remove|style|test|build|docs|chore|ci|BREAKING CHANGE)(?:\\((?P<scope>[^()\\r\\n]*)\\)|\\()?(?P<breaking>!)?:\\s(?P<message>.*)?"
14+
# The changelog_pattern identifies the commit types
15+
# that will be included.
16+
# Build the changelog with 'cz ch' on the staging or production branches.
17+
changelog_pattern: "^(feat|fix|perf|refactor|remove|style|test|build|docs|chore|ci)?"
18+
# A mapping of type to its group name in the changelog.
19+
# We call 'feat' commits 'New Features'
20+
change_type_map:
21+
build: Build
22+
docs: Documentation
23+
feat: New Features
24+
fix: Bug Fixes
25+
perf: Performance Improvements
26+
refactor: Refactoring
27+
remove: Removed
28+
style: Stylistic Changes
29+
ci: CI/CD
30+
test: Testing
31+
# The order of commit types in the changelog...
32+
change_type_order:
33+
- "feat"
34+
- "fix"
35+
- "perf"
36+
- "refactor"
37+
- "remove"
38+
- "style"
39+
- "test"
40+
- "build"
41+
- "chore"
42+
- "ci"
43+
- "docs"

.github/workflows/build.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: build
3+
4+
# -----------------
5+
# Control variables (GitHub Secrets)
6+
# -----------------
7+
#
8+
# At the GitHub 'organisation' or 'project' level you must have the following
9+
# GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
10+
#
11+
# (none)
12+
#
13+
# -----------
14+
# Environment (GitHub Environments)
15+
# -----------
16+
#
17+
# Environment (none)
18+
19+
on:
20+
push:
21+
branches:
22+
- '**'
23+
tags-ignore:
24+
- '**'
25+
schedule:
26+
# Build daily at 6:04am...
27+
- cron: '4 6 * * *'
28+
29+
env:
30+
POETRY_VERSION: '1.8.3'
31+
32+
jobs:
33+
build:
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
python-version:
38+
- '3.12'
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
- name: Set up Python ${{ matrix.python-version }}
43+
uses: actions/setup-python@v5
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
- name: Install requirements
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install --no-cache-dir poetry==$POETRY_VERSION
50+
poetry install --with dev --no-root --no-directory
51+
- name: Test
52+
run: |
53+
pre-commit run --all-files
54+
- name: Build
55+
run: |
56+
poetry build

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ repos:
6565
- jinja2==3.0.3
6666
- jsonschema >= 3.2.0, < 4.0
6767
- pyyaml >= 5.3.1, < 7.0
68-
files: ^workflow/.*\.py$
68+
files: ^workflow/.*\.py$

.yamllint

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
3+
yaml-files:
4+
- '*.yaml'
5+
- '*.yml'
6+
- '.yamllint'
7+
8+
ignore: |
9+
.github/
10+
11+
rules:
12+
indentation:
13+
spaces: 2
14+
indent-sequences: no
15+
trailing-spaces: {}
16+
truthy:
17+
allowed-values:
18+
- 'yes'
19+
- 'no'
20+
- 'true'
21+
- 'false'
22+
new-lines:
23+
type: unix
24+
new-line-at-end-of-file: enable
25+
key-duplicates: {}
26+
hyphens:
27+
max-spaces-after: 1
28+
empty-lines:
29+
max: 2
30+
document-start:
31+
present: yes
32+
document-end:
33+
present: no
34+
colons:
35+
max-spaces-before: 0
36+
max-spaces-after: 1
37+
commas:
38+
max-spaces-before: 0
39+
min-spaces-after: 1
40+
max-spaces-after: 1

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ Get in touch
3636

3737
- Report bugs, suggest features or view the source code `on GitHub`_.
3838

39-
.. _on GitHub: https://github.com/informaticsmatters/squonk2-data-manager-workflow-decoder
39+
.. _on GitHub: https://github.com/informaticsmatters/squonk2-data-manager-workflow-decoder

poetry.lock

Lines changed: 118 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ python = "^3.12"
1313
jsonschema = "^4.21.1"
1414
pyyaml = ">= 5.3.1, < 7.0"
1515

16+
[tool.poetry.group.dev.dependencies]
17+
pre-commit = "^3.7.0"
18+
1619
[build-system]
1720
requires = ["poetry-core"]
1821
build-backend = "poetry.core.masonry.api"

workflow/decoder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
This is typically used by the Data Manager's Workflow Engine.
44
"""
5+
56
import os
67
from typing import Any, Dict, Optional
78

0 commit comments

Comments
 (0)