Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

Expand Down
133 changes: 133 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: py-ga-mob

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [created]
schedule:
- cron: '1 3 * * 1'

jobs:
analyze:
name: Analyze
if: github.event_name != 'release'
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]

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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

build:
name: CI
if: ${{ github.event_name != 'release' || github.event_name != 'schedule' }}
runs-on: ubuntu-latest
strategy:
matrix:
language: [ 'python' ]
python-version: [3.6, 3.7, 3.8, 3.9]

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

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

- name: Cache pip artifacts
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python setup.py install

#- name: Audit
# run: |
# pylama pyga -i E501

- name: Test ${{ matrix.test_number }}
run: |
python setup.py test
# coverage run --source=pyga setup.py test

#- name: Coveralls Parallel
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# flag-name: run-${{ matrix.test_number }}
# parallel: true

#finish:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.github_token }}
# parallel-finished: true

deploy:
name: CD
if: ${{ github.event_name == 'release' && github.event.release.action == 'released' }}
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v2
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/*
55 changes: 0 additions & 55 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/python-package.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/python-publish.yml

This file was deleted.

8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
*pyc
dist
build
*.egg-info
*.egg
doc/_build
*~
.ropeproject
.vimrc
.coverage
.eggs/
doc/_build
dist
build
.pytest_cache
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
'Topic :: Internet :: WWW/HTTP :: WSGI',
],
test_suite='tests',
tests_require=['mock',]
tests_require=['mock', 'python-coveralls']
)