Skip to content

Commit

Permalink
Add github CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
eliorerz committed Mar 29, 2021
1 parent 03aa128 commit acd7cf8
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI - Upload Python Package

on:
workflow_run:
workflows: ["CI - Unit Tests"]
types:
- completed

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel==0.36.2 vcversioner==2.16.0.0 tox==3.23.0
- name: Versioning
run: |
git config --global user.email "[email protected]"
git config --global user.name "Elior Erez"
python version.py
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
tox -e release
33 changes: 33 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI - Unit Tests

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

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox==3.23.0 pytest==6.2.2 vcversioner==2.16.0.0
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
tox -e pep8
- name: Test with pytest
run: |
tox -e py

0 comments on commit acd7cf8

Please sign in to comment.