Skip to content

Commit

Permalink
Merge 4f120ea into fc45648
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed May 16, 2023
2 parents fc45648 + 4f120ea commit 0cf61c8
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 20 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Draft Release

on:
workflow_dispatch:

jobs:
build:
name: Draft Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: "poetry"
cache-dependency-path: poetry.lock

- name: Build project
run: |
poetry build
echo "version=$(poetry version --short)" >> "$GITHUB_ENV"
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
tag_name: ${{ env.version }}
draft: true
Original file line number Diff line number Diff line change
@@ -1,48 +1,57 @@
name: Python package
name: Python tests

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
push:
branches: [ master ]
paths:
- 'pyproject.toml'
- 'poetry.lock'
- '**.py'
- '.github/workflows/python-tests.yml'

pull_request:
branches: [ master ]
paths:
- 'pyproject.toml'
- 'poetry.lock'
- '**.py'
- '.github/workflows/python-tests.yml'

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3

- name: Install poetry
run: pipx install poetry

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1.3.3
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
cache: "poetry"
cache-dependency-path: poetry.lock

- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
poetry run pytest --cov=./
- name: Upload coverage data to coveralls.io
run: |
pip install coveralls
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tkinter Layout Helpers

[![Python package](https://github.com/insolor/tkinter_layout_helpers/actions/workflows/python-package.yml/badge.svg)](https://github.com/insolor/tkinter_layout_helpers/actions/workflows/python-package.yml)
[![Python package](https://github.com/insolor/tkinter_layout_helpers/actions/workflows/python-tests.yml/badge.svg)](https://github.com/insolor/tkinter_layout_helpers/actions/workflows/python-tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/insolor/tkinter_layout_helpers/badge.svg?branch=master)](https://coveralls.io/github/insolor/tkinter_layout_helpers?branch=master)

A library which is intended to simplify a placement of widgets:
Expand Down

0 comments on commit 0cf61c8

Please sign in to comment.