-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d1abff
commit b122ae5
Showing
5 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-python.python", | ||
"charliermarsh.ruff" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.