Skip to content

Commit

Permalink
added support for older python, added matrix, added publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
glevv committed Nov 26, 2023
1 parent b0642d8 commit e803a2d
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: True
matrix:
python-version: [3.9, 3.10, 3.11, 3.12]
defaults:
run:
shell: bash

steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
Expand Down Expand Up @@ -67,8 +70,11 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python-version == '3.11'
with:
flags: smart-tests
verbose: true
file: ./coverage.xml
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
release:
types:
- created

jobs:
publish:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Check-out repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local # the path depends on the OS
key: poetry # increment to reset cache

- name: Install poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1

- name: Restore cached dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install package
run: poetry install

- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "obscure_stats"
version = "0.1.1"
version = "0.1.2"
description = "Collection of less known statistical functions"
authors = ["Gleb Levitski"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.10,<3.13"
numpy = "^1.26.1"
scipy = "^1.11.3"
python = ">=3.9,<3.13"
numpy = "^1.23.5"
scipy = "^1.9.1"


[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit e803a2d

Please sign in to comment.