Skip to content

Commit

Permalink
Migrated to yhttp >= 5
Browse files Browse the repository at this point in the history
  • Loading branch information
pylover committed Aug 18, 2024
1 parent 80ebcf0 commit 4a5fbe1
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 2 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build

on:
push:
branches: [ master ]
tags: [ 'v*' ]

pull_request:
branches: [ master ]

jobs:
test:
name: Pytest
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
env:
PREFIX: /usr
FLAKE8: flake8
PYTEST: pytest
COVERAGE: coverage
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
git clone https://github.com/pylover/python-makelib.git make
make env ENV=ci
sudo cp `which bddcli-bootstrapper` /usr/local/bin
- name: Lint
run: make lint
- name: Test
run: make cover
- name: Coveralls
run: coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

coveralls-finish:
name: Coveralls finish
needs: test
runs-on: ubuntu-latest
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install dependencies
run: python -m pip install coveralls
- name: Coveralls Finished
run: coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

release:
name: Github Release
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy

on:
release:
types: [created]

jobs:
deploypypi:
name: Deploy to PyPI
runs-on: ubuntu-latest
env:
PREFIX: /usr
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Install dependencies
run: |
git clone https://github.com/pylover/python-makelib.git make
make env ENV=ci
- name: Create distributions
run: make dist
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.9
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion make
Submodule make updated 4 files
+17 −4 common.mk
+39 −0 release.sh
+3 −0 sphinx.mk
+1 −3 test.mk
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
install_requires=dependencies,
packages=find_namespace_packages(
where='./',
include=['yhttp'],
include=['yhttp.ext.dbmanager'],
exclude=['tests']
),
license='MIT',
Expand Down

0 comments on commit 4a5fbe1

Please sign in to comment.