Skip to content

Commit

Permalink
Merge pull request #1359 from codebyaryan/fix-actions
Browse files Browse the repository at this point in the history
Fix actions
  • Loading branch information
syrusakbary committed Aug 24, 2021
2 parents efc0353 + 4769655 commit f039af2
Show file tree
Hide file tree
Showing 23 changed files with 138 additions and 191 deletions.
File renamed without changes.
25 changes: 25 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: 📊 Check Coverage
on:
push:
branches:
- master
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
pull_request:
branches:
- master
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
jobs:
coveralls_finish:
# check coverage increase/decrease
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
26 changes: 26 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 🚀 Deploy to PyPI

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build wheel and source tarball
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1.1.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
26 changes: 26 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 💅 Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run lint
run: tox
env:
TOXENV: pre-commit
- name: Run mypy
run: tox
env:
TOXENV: mypy
29 changes: 0 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,3 @@ jobs:

- run: pip install tox
- run: tox -e ${{ matrix.tox }}

coveralls_finish:
# check coverage increase/decrease
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop

deploy:
# builds and publishes to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
20 changes: 11 additions & 9 deletions .pre-commit-config.yml → .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
default_language_version:
python: python3.8

repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
rev: v2.3.0
hooks:
- id: check-merge-conflict
- id: check-json
Expand All @@ -13,16 +16,15 @@ repos:
- --autofix
- id: trailing-whitespace
exclude: README.md
- repo: https://github.com/asottile/pyupgrade
rev: v1.12.0
- repo: git://github.com/asottile/pyupgrade
rev: v2.24.0
hooks:
- id: pyupgrade
- repo: https://github.com/ambv/black
rev: 19.10b0
- repo: git://github.com/ambv/black
rev: 19.3b0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 3.7.8
- id: black
- repo: git://github.com/PyCQA/flake8
rev: 3.8.4
hooks:
- id: flake8

0 comments on commit f039af2

Please sign in to comment.