Skip to content

Commit

Permalink
✨ feat: first commit :D
Browse files Browse the repository at this point in the history
  • Loading branch information
adriamontoto committed Dec 21, 2024
0 parents commit f22217f
Show file tree
Hide file tree
Showing 21 changed files with 880 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: πŸ› Bug Report
description: Report a bug or unexpected behavior in βš’οΈ Object Mother Pattern.
labels: [bug, pending]

body:
- type: markdown
attributes:
value: Thank you for interest! Please fill out the form below to report a bug. πŸ’₯

- type: textarea
id: description
validations:
required: true
attributes:
label: Description
description: |
Please explain what you are seeing and what you would expect to see.
Please provide as much detail as possible to make understanding and solving your problem as quick as possible. πŸ™
- type: textarea
id: example
attributes:
label: Example Code
render: Python
description: >
If applicable, please add a self-contained,
[minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example)
demonstrating the bug.
placeholder: |
import object_mother_pattern
...
- type: textarea
id: version
validations:
required: true
attributes:
label: Python, Object Mother Pattern & OS Version
render: Text
description: |
Which version of Python & CObject Mother Pattern are you using, and which Operating System?
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ✨ Feature Request
description: Suggest a new feature for βš’οΈ Object Mother Pattern.
labels: [enhancement, pending]

body:
- type: markdown
attributes:
value: Thank you for interest! Please fill out the form below to suggest a new feature. πŸš€

- type: textarea
id: description
validations:
required: true
attributes:
label: Description
description: |
Please give as much detail as possible about the feature you would like to suggest. πŸ™
You might like to add:
* A demo of how code might look when using the feature
* Your use case(s) for the feature
* Why the feature should be added to object mother pattern (as opposed to another library or just implemented in your code)
16 changes: 16 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
commit-message:
prefix: 'πŸ‘·πŸ» ci:'

- package-ecosystem: pip
directory: '/'
schedule:
interval: daily
commit-message:
prefix: 'πŸ“¦ build:'
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Code Quality Pipeline

on:
push:
branches: [master]
pull_request:
branches: [master]
types: [opened, synchronize]
schedule:
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC

permissions:
security-events: write

jobs:
analyze:
name: Code Quality Pipeline - ${{ matrix.language }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
language: [python]
build-mode: [none]

steps:
- name: πŸ“₯ Checkout the repository
uses: actions/checkout@v4.2.2

- name: ▢️ CodeQL Initialization
uses: github/codeql-action/init@v3.27.9
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended, security-and-quality

- name: πŸ”¬ CodeQL Analysis
uses: github/codeql-action/analyze@v3.27.9
with:
category: '/language:${{matrix.language}}'
48 changes: 48 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Smokeshow Pipeline

on:
workflow_run:
workflows: [Test Pipeline]
types: [completed]

permissions:
statuses: write

jobs:
smokeshow:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.13]

name: Smokeshow Pipeline
timeout-minutes: 5
steps:
- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}

- name: πŸ“¦ Install dependencies
run: pip install smokeshow

- name: πŸ“₯ Download coverage files
uses: actions/download-artifact@v4.1.8
with:
name: coverage-html
path: htmlcov
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: πŸ“Š Upload coverage report
run: smokeshow upload htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 100
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
54 changes: 54 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Format Pipeline

on:
push:
branches: [master]
pull_request:
branches: [master]
types: [opened, synchronize]

permissions:
contents: write

jobs:
format:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.13]

name: Format Pipeline - Python ${{ matrix.python-version }} on ${{ matrix.os }}
timeout-minutes: 5
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/checkout@v4.2.2

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}

- id: cache
name: πŸ“¦ Create cache
uses: actions/cache@v4.2.0
with:
path: ${{ env.pythonLocation }}
key: ${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'requirements*') }}
restore-keys: ${{ matrix.os }}-python-${{ matrix.python-version }}-

- name: πŸ“¦ Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: make install-dev

- name: πŸƒ Run Formatter
run: make format

- name: πŸ“€ Commit & Push Changes
uses: EndBug/add-and-commit@v9.1.4
with:
add: .
message: 'πŸ”¨ refactor: run automatic formatter'
commit: --signoff
default_author: github_actions
50 changes: 50 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Lint Pipeline

on:
push:
branches: [master]
pull_request:
branches: [master]
types: [opened, synchronize]

jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.13]

name: Lint Pipeline - Python ${{ matrix.python-version }} on ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/checkout@v4.2.2

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}

- id: cache
name: πŸ“¦ Create cache
uses: actions/cache@v4.2.0
with:
path: ${{ env.pythonLocation }}
key: ${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'requirements*') }}
restore-keys: ${{ matrix.os }}-python-${{ matrix.python-version }}-

- name: πŸ“¦ Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: make install-dev

- name: πŸƒ Run Linter
run: make lint

- name: πŸ«™ Store type coverage
uses: actions/upload-artifact@v4.5.0
if: always()
with:
name: type_coverage_report_${{ matrix.os }}_${{ matrix.python-version }}
path: index.txt
47 changes: 47 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish Pipeline

on:
release:
types: [created]

jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.13]

environment:
name: pypi
url: https://pypi.org/p/object-mother-pattern/

permissions:
id-token: write

name: Publish Pipeline
timeout-minutes: 5
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/checkout@v4.2.2

- name: 🐍 Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}

- name: πŸ“¦ Install dependencies
run: pip install build

- name: πŸ› οΈ Build distribution
run: python -m build

- name: πŸ«™ Store distribution package
uses: actions/upload-artifact@v4.5.0
with:
name: python-package-distributions
path: dist/

- name: πŸš€ Publish
uses: pypa/gh-action-pypi-publish@v1.12.3
Loading

0 comments on commit f22217f

Please sign in to comment.