Skip to content

Commit 768b4f4

Browse files
Merge pull request #176 from Doist/cleanup-project-setup
Cleanup project setup
2 parents 131c6fc + 3672739 commit 768b4f4

28 files changed

Lines changed: 1049 additions & 562 deletions

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @Doist/Integrations
1+
* @Doist/Backend

.github/workflows/ci.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: tests
22

33
on: [pull_request, workflow_dispatch]
44

5+
env:
6+
POETRY_HOME: ${{ github.workspace }}/.poetry
7+
58
jobs:
69
build-test:
710
runs-on: ubuntu-latest
@@ -11,18 +14,29 @@ jobs:
1114
with:
1215
fetch-depth: 1
1316

17+
- name: Read Python version
18+
id: python-version
19+
run: echo "version=$(cat .python-version)" >> $GITHUB_OUTPUT
20+
21+
- name: Read Poetry version
22+
id: poetry-version
23+
run: echo "version=$(cat .poetry-version)" >> $GITHUB_OUTPUT
24+
1425
- name: Set up Python
1526
uses: actions/setup-python@v5
1627
with:
17-
python-version: "3.11"
28+
python-version: ${{ steps.python-version.outputs.version }}
29+
30+
- name: Set up Poetry
31+
run: |
32+
python3 -m venv $POETRY_HOME
33+
$POETRY_HOME/bin/pip install "poetry==${{ steps.poetry-version.outputs.version }}"
1834
1935
- name: Install dependencies
2036
run: |
21-
set -ex
22-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - --yes
23-
$HOME/.poetry/bin/poetry install
37+
$POETRY_HOME/bin/poetry install --with dev
2438
2539
- name: Test with pytest
2640
run: |
2741
set -ex
28-
$HOME/.poetry/bin/poetry run pytest
42+
$POETRY_HOME/bin/poetry run pytest

.github/workflows/publish.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: Release package
22

33
on:
4-
push:
5-
tags:
6-
- 'v*'
4+
push:
5+
tags:
6+
- "v*"
7+
8+
env:
9+
POETRY_HOME: ${{ github.workspace }}/.poetry
710

811
jobs:
912
build-test:
@@ -14,23 +17,32 @@ jobs:
1417
with:
1518
fetch-depth: 1
1619

20+
- name: Read Python version
21+
id: python-version
22+
run: echo "version=$(cat .python-version)" >> $GITHUB_OUTPUT
23+
24+
- name: Read Poetry version
25+
id: poetry-version
26+
run: echo "version=$(cat .poetry-version)" >> $GITHUB_OUTPUT
27+
1728
- name: Set up Python
18-
uses: actions/setup-python@v3
29+
uses: actions/setup-python@v5
1930
with:
20-
python-version: "3.11"
31+
python-version: ${{ steps.python-version.outputs.version }}
32+
33+
- name: Set up Poetry
34+
run: |
35+
python3 -m venv $POETRY_HOME
36+
$POETRY_HOME/bin/pip install "poetry==${{ steps.poetry-version.outputs.version }}"
2137
2238
- name: Install dependencies
2339
run: |
24-
set -ex
25-
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python3 - --yes
26-
$HOME/.poetry/bin/poetry install
40+
$POETRY_HOME/bin/poetry install --with publishing
2741
2842
- name: Build and publish to PyPI
2943
env:
3044
TWINE_USERNAME: __token__
3145
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
3246
run: |
33-
python -m pip install --upgrade pip
34-
pip install setuptools wheel twine build
35-
python -m build
36-
python -m twine upload dist/*
47+
$POETRY_HOME/bin/poetry run python -m build
48+
$POETRY_HOME/bin/poetry run python -m twine upload dist/*

.isort.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

.poetry-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.2

mypy.ini

Lines changed: 0 additions & 13 deletions
This file was deleted.

poetry.lock

Lines changed: 780 additions & 144 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)