Skip to content

Commit

Permalink
Merge pull request #8 from sdelements/feature/devop-6765/implement-gi…
Browse files Browse the repository at this point in the history
…thub-actions

Replace travis-ci with github actions
  • Loading branch information
SunnyR authored May 27, 2024
2 parents a217f45 + 2b08297 commit e660f2f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 38 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: dev

on:
push:
branches:
- develop
- master
- main
- 'releases/**'
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
validate:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools poetry
poetry install
- name: lint
run: |
poetry run isort .
poetry run black .
poetry run flake8 . --extend-ignore=D,E501,W601 --extend-exclude=docs/ --statistics --count
- name: security
run: poetry run bandit -c pyproject.toml -r .
- name: test
run: python -m unittest discover
32 changes: 32 additions & 0 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: prod

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools poetry tox-gh-actions
poetry install
- name: Build wheels and source tarball
run: poetry build
- name: publish to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

9 changes: 0 additions & 9 deletions Makefile

This file was deleted.

0 comments on commit e660f2f

Please sign in to comment.