Skip to content

Commit

Permalink
Use poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
datashaman committed Mar 2, 2023
1 parent cb79337 commit 65cef46
Show file tree
Hide file tree
Showing 21 changed files with 2,111 additions and 249 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig is awesome: http://EditorConfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[{*.json,Makefile,*.sh,*.tf,*.yml}]
indent_size = 2
3 changes: 0 additions & 3 deletions .envrc.example

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf whitespace=tab-in-indent,blank-at-eol,tabwidth=4
Makefile text whitespace=-tab-in-indent,blank-at-eol,tabwidth=2
24 changes: 17 additions & 7 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,29 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
- name: Install Poetry
run: pipx install poetry

- name: Set up Python 🐍
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
cache: poetry

- name: Install dependencies
run: make install

- name: Lint code
run: make lint

- name: Run tests
run: make test

- name: Make package
run: make dist
- name: Build package 📦
run: make build

- name: Publish package 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
run:
poetry config pypi-token.pypi "${{ secrets.PYPI_API_TOKEN }}"
make publish GITHUB_REF="${{ github.ref }}"
Loading

0 comments on commit 65cef46

Please sign in to comment.