Skip to content

Commit

Permalink
(chore:) Add CI workflow (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertomr86 authored Sep 28, 2023
1 parent 1d1abff commit b122ae5
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 2 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: ci
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
build:
continue-on-error: True
runs-on: ubuntu-latest
strategy:
matrix:
# https://devguide.python.org/versions/#python-release-cycle
# TODO: Support 3.10+
python-version: [3.7,3.8,3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
python -m pip install build --user
- name: Build
run: python -m build
- name: Upload distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-${{ matrix.python-version }}
path: dist/
# - name: Lint with Ruff
# run: |
# pip install ruff
# ruff --output-format=github --target-version=py37 python_logging_rabbitmq
# continue-on-error: true
- name: Test with pytest
run: |
python -m pytest \
--doctest-modules \
--junitxml=junit/test-results-${{ matrix.python-version }}.xml \
--cov=com \
--cov-report=xml \
--cov-report=html
- name: Upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
junit/
.tox/
.coverage
.coverage.*
.cache
.ruff_cache
nosetests.xml
coverage.xml
*.cover
Expand Down Expand Up @@ -93,4 +95,9 @@ tags

## IDE
.idea/
.vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"ms-python.python",
"charliermarsh.ruff"
]
}
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# python-logging-rabbitmq

[![Build Status](https://travis-ci.org/albertomr86/python-logging-rabbitmq.svg?branch=master)](https://travis-ci.org/albertomr86/python-logging-rabbitmq)
![Package License](https://img.shields.io/github/license/albertomr86/python-logging-rabbitmq)
![PyPI - Version](https://img.shields.io/pypi/v/python_logging_rabbitmq)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/python_logging_rabbitmq)
![Build Status](https://github.com/albertomr86/python-logging-rabbitmq/workflows/ci/badge.svg)


Logging handler to ships logs to RabbitMQ. Compatible with Django.

Expand Down
File renamed without changes.

0 comments on commit b122ae5

Please sign in to comment.