Skip to content

Commit

Permalink
Feature/gh action (#23)
Browse files Browse the repository at this point in the history
* gh-action

* fix deps

* update deps

* update

* Best commit ever

* happy monday _ bleh _

* This branch is so dirty, even your mom can't clean it.

* Herpy dooves.

* TODO: Replace placeholder code

Co-authored-by: Giulio Calzolari <giuliocalzolari@users.noreply.github.com>
  • Loading branch information
giuliocalzolari and giuliocalzolari authored Aug 9, 2021
1 parent 461d5ef commit 0ffcd52
Show file tree
Hide file tree
Showing 23 changed files with 1,500 additions and 449 deletions.
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Upload Python Package

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
draft: false
prerelease: false
deploy:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Python testing

on: [push, pull_request]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: [3.6]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pipenv wheel pytest
pipenv install --dev
- name: Run Tests
run: |
pipenv run pytest --record-mode=none tests/test* -vv
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache/
*.py[cod]
*$py.class

Expand Down
39 changes: 0 additions & 39 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
include LICENSE
include README.md
include requirements.txt
include Pipfile
include Pipfile.lock

include pse_timecard
include salesforce_timecard
include tests
recursive-exclude * __pycache__
recursive-exclude * *.py[co]

Expand Down
20 changes: 10 additions & 10 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ verify_ssl = true
name = "pypi"

[packages]
simple_salesforce = "*"
click = "*"
tabulate = "*"
click-aliases = "*"
setupext-janitor = "*"
pyyaml = "*"
keyring = "*"
click = ">=7.1.2"
click_aliases = ">=1.0.1"
tabulate = ">=0.8.7"
simple_salesforce = ">=1.10.1"
keyring = ">=21.4.0"
pyyaml = ">=5.3.1"
pydantic = ">=1.6.1"

[dev-packages]
pytest = "*"
mock = "*"
flake8 = "*"
freezegun = "*"
pytest = ">=6.0.2"
pytest-recording = ">=0.9.0"

[requires]
python_version = "3.6"
Loading

0 comments on commit 0ffcd52

Please sign in to comment.