Skip to content

Commit

Permalink
Merge pull request #10 from gkze/updates
Browse files Browse the repository at this point in the history
Update dependencies & add release workflow
  • Loading branch information
gkze authored Jul 5, 2022
2 parents 9b3fd89 + 1b81a2f commit 1baea0e
Show file tree
Hide file tree
Showing 6 changed files with 349 additions and 504 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 2

updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: monthly
33 changes: 24 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
---
name: CI
on: [push, pull_request]

on:
- push
- pull_request

jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
poetry-version: [1.1.2, 1.1.3, 1.1.4]
os: [ubuntu-18.04, macos-latest, windows-latest]
python-version:
- "3.8"
- "3.9"
- "3.10"
os:
- ubuntu-latest
- macos-latest
- windows-latest

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Upgrade pip
run: pip3 install -U pip

- name: Install Poetry
run: pip3 install -U poetry

- name: Set up dependencies
run: poetry install

- name: Run linters
run: poetry run multilint

- name: Run unit tests
run: poetry run python -m unittest -v
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10.4"

- name: Upgrade pip
run: pip3 install -U pip

- name: Install Poetry
run: pip3 install -U poetry

- name: Install dependencies
run: poetry install

- name: Build artifacts
run: poetry build

- name: Create GitHub Release
run: gh release create $(poetry version -s) dist/*
env:
GH_TOKEN: ${{ secrets.ACTIONS }}

- name: Upload artifacts to PyPI
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPITOKEN }}
Loading

0 comments on commit 1baea0e

Please sign in to comment.