diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..856e5a6 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..62e3512 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 }} diff --git a/make b/make index 5a386a2..a3cd500 160000 --- a/make +++ b/make @@ -1 +1 @@ -Subproject commit 5a386a2274c48f3b886e15d95f7fd61010d37335 +Subproject commit a3cd500dc279fc6abd3fb210cfec696572652fbf diff --git a/setup.py b/setup.py index b6c63bf..0fdf1f3 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ install_requires=dependencies, packages=find_namespace_packages( where='./', - include=['yhttp'], + include=['yhttp.ext.dbmanager'], exclude=['tests'] ), license='MIT',