diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..e416c88 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,39 @@ +name: dev + +on: + push: + branches: + - develop + - master + - main + - 'releases/**' + pull_request: + branches: + - '*' + workflow_dispatch: + +jobs: + validate: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - 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: | + python -m pip install --upgrade pip setuptools poetry + poetry install + - name: lint + run: | + poetry run isort . + poetry run black . + poetry run flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count + - name: security + run: poetry run bandit -c pyproject.toml -r . + - name: test + run: python -m unittest discover diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml new file mode 100644 index 0000000..bc673de --- /dev/null +++ b/.github/workflows/prod.yml @@ -0,0 +1,32 @@ +name: prod + +on: + push: + tags: + - '*' + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.12"] + steps: + - 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: | + python -m pip install --upgrade pip setuptools poetry tox-gh-actions + poetry install + - name: Build wheels and source tarball + run: poetry build + - name: publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + skip_existing: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index be25434..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -os: linux -dist: jammy -language: python -python: -- '3.12' -branches: - only: - - master -before_install: -- pip install -U setuptools poetry -install: -- poetry install -jobs: - include: - - stage: test - if: tag IS blank - script: - - poetry run make lint - - poetry run make test - - poetry run make security -deploy: - provider: pypi - distributions: sdist bdist_wheel - username: __token__ - password: - secure: LJoJiHlInJ0pVKvli7H7mDqGg7Y+2L0rC79yKd4v02zJwEkDT4Y9XcjUbe7l/lctpPGwyJ+o2756TWqC9Lcsj/kaC6bFTq8JxuCGWaNAxS7E9cARi3y4Y4ovXAz+l9APRxZ9z1rM0hVLZhnjTetz/t02hpJrKLO4Jgy7aS4VOLl2TA1gTMx7Agjje41Fl0z1Ep/FXDCcgM7uxCmQHykSx54vXMq+nEgkhxr9/TIh4RigEly6eex3OSX8KHW4cufnU43otJL0qGhgRqdGH6xpA0wFPJf3PRtscQvp8g8VQIpe+MsFWaYRna3NRicO69SBoH0hjxhcKalZ3SSL/xHSP19BFtUbadyLOt4UdUM1/Lz0jR6RR882pLQGaOIMI1UG0QVKrLYWL6CqEOd85hbv0Cdz9qnd8ZwoDAEeekSv4RMyDKHp3k5NcNQmuX99xiWw+3B00R+58ONmI0DbaJjcTXDB7HZShXmY2KAiN+5q39mo8g+5oIyzN3DS0qiqLCrtJ3A2Hz4qmGH3GjbRpJALtBHFGyYrZWHp8lMki4p5w8+Yim6UAhRIIJRiNC0CEeqEF0YbO/VVi2c+RgEckxCDl7LWwl6yu4uS5TzrDnGvk+zGggPgxMmAKU52f8uPjDCUzdBoTmoP85UI6uzqmr7CeqqtHhe/yhNtgYOHeuhPQ4o= - on: - tags: true - repo: sdelements/depocs diff --git a/Makefile b/Makefile deleted file mode 100644 index 869ea0a..0000000 --- a/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -lint: - black . - flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count - -test: - python -m unittest discover - -security: - bandit -c pyproject.toml -r .