Skip to content

Commit

Permalink
Merge pull request #3 from samuelmat19/feature/clean_project
Browse files Browse the repository at this point in the history
Feature/clean project
  • Loading branch information
samkoesnadi authored Jul 18, 2022
2 parents a3352dd + 2b35769 commit 4d3cdd6
Show file tree
Hide file tree
Showing 16 changed files with 927 additions and 176 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Code check

on: [push]

jobs:
Pylint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install .
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
Bandit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install .
- name: Analyzing the code using bandit
run: |
bandit .
Pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install .
- name: Checking the test codes using Pytest
run: |
python -m pytest .
23 changes: 0 additions & 23 deletions .github/workflows/pylint.yml

This file was deleted.

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

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- 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@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
**/__pycache__
*.egg-info
dist

logs
.idea
checkpoints
Expand Down
Loading

0 comments on commit 4d3cdd6

Please sign in to comment.