Skip to content

Commit

Permalink
Add OSS stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bfontaine committed Dec 5, 2023
1 parent c3ce676 commit 2d315b0
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
# See https://github.com/actions/python-versions/releases for available versions
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12.0" ]

steps:
- name: Checkout
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 }}
cache: 'poetry'

- name: Install dependencies
run: |
poetry install
- name: Lint with Mypy
run: |
poetry run mypy mmc
- name: Run Tests
run: |
poetry run pytest -v
- name: Test build
run: |
poetry build
19 changes: 19 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python package

on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.17
with:
python_version: "3.9"
pypi_token: ${{ secrets.PYPI_TOKEN }}
ignore_dev_requirements: yes
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.mypy_cache
.venv

18 changes: 18 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright © 2022-2024 – Bixoto.com

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Empty file added conftest.py
Empty file.
Empty file added mmc/py.typed
Empty file.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[tool.poetry]
name = "mmc"
version = "0.1.0"
description = ""
description = "Minimal Mattermost API client"
authors = ["Baptiste Fontaine <baptiste@bixoto.com>"]
license = "MIT"
include = ["mmc/py.typed"]
homepage = "https://github.com/Bixoto/mmc"
readme = "README.md"

[tool.poetry.dependencies]
Expand Down

0 comments on commit 2d315b0

Please sign in to comment.