Skip to content

Commit

Permalink
chore: better automation
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Sep 29, 2024
1 parent 658654c commit 29dfe7b
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 56 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy Workflow
on:
push:
tags:
- "*"
jobs:
build:
name: Build
strategy:
matrix:
python-version: [2.7]
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: python --version
- run: pip install -r requirements.txt
- run: python setup.py test
- run: pip install twine wheel
- run: python setup.py sdist bdist_wheel
- run: python -m twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
55 changes: 55 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Main Workflow
on: [push]
jobs:
build:
name: Build
strategy:
matrix:
python-version: [
2.7,
3.5,
3.6,
3.7,
3.8,
3.9,
"3.10",
"3.11",
"3.12",
latest,
rc
]
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: python --version
- run: pip install -r requirements.txt
- run: |
pip install black
black . --check
if: matrix.python-version == '3.12'
- run: |
pip install pytest
pytest
- run: python setup.py test
if: matrix.python-version != '3.12' && matrix.python-version != 'latest'
build-pypy:
name: Build PyPy
strategy:
matrix:
python-version: [2.7, 3.6, 3.9, "3.10"]
runs-on: ubuntu-latest
container: pypy:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- run: pypy --version
- run: pip install -r requirements.txt
- run: |
pip install black
black . --check
if: matrix.python-version == '3.12'
- run: |
pip install pytest
pytest
- run: pypy setup.py test
if: matrix.python-version != '3.12' && matrix.python-version != 'latest'
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

*

### Changed

* Better code structure aligned with black

### Fixed

*
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# [Slack API](http://slack-api.hive.pt)

Implementation of the Slack OAuth based API.

## Configuration

| Name | Type | Description |
| ----- | ----- | ----- |
| **SLACK_ID** | `str` | The Slack identifier to make API requests (defaults to `None`). |
| **SLACK_SECRET** | `str` | The secret key to be used to authenticate API requests (defaults to `None`). |
| **SLACK_REDIRECT_URL** | `str` | The URL to be used for the OAuth redirection process (defaults to `None`). |

## License

Slack API is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).

## Build Automation

[![Build Status](https://app.travis-ci.com/hivesolutions/slack-api.svg?branch=master)](https://travis-ci.com/github/hivesolutions/slack-api)
[![Coverage Status](https://coveralls.io/repos/hivesolutions/slack-api/badge.svg?branch=master)](https://coveralls.io/r/hivesolutions/slack-api?branch=master)
[![PyPi Status](https://img.shields.io/pypi/v/slack-api.svg)](https://pypi.python.org/pypi/slack-api)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)
# [Slack API](http://slack-api.hive.pt)

Implementation of the Slack OAuth based API.

## Configuration

| Name | Type | Description |
| ---------------------- | ----- | ---------------------------------------------------------------------------- |
| **SLACK_ID** | `str` | The Slack identifier to make API requests (defaults to `None`). |
| **SLACK_SECRET** | `str` | The secret key to be used to authenticate API requests (defaults to `None`). |
| **SLACK_REDIRECT_URL** | `str` | The URL to be used for the OAuth redirection process (defaults to `None`). |

## License

Slack API is currently licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/).

## Build Automation

[![Build Status](https://github.com/hivesolutions/slack-api/workflows/Main%20Workflow/badge.svg)](https://github.com/hivesolutions/slack-api/actions)
[![Coverage Status](https://coveralls.io/repos/hivesolutions/slack-api/badge.svg?branch=master)](https://coveralls.io/r/hivesolutions/slack-api?branch=master)
[![PyPi Status](https://img.shields.io/pypi/v/slack-api.svg)](https://pypi.python.org/pypi/slack-api)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)

0 comments on commit 29dfe7b

Please sign in to comment.