Skip to content

Commit

Permalink
Merge ci pipeline in single GitHub actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
StegSchreck committed Dec 30, 2019
1 parent a96a595 commit 119239d
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 58 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
pytest
docker:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Publish to GitHub Docker Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: stegschreck/rats/rats
username: ${{ secrets.GITHUB_DOCKER_USERNAME }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
tag_names: true

release:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Create Release
if: success() && startsWith(github.ref, 'refs/tags/')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: commits[0][message]
draft: false
prerelease: false
20 changes: 0 additions & 20 deletions .github/workflows/dockerimage.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/pythonapp.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ notifications:
email:
on_success: change
on_failure: always
deploy:
provider: releases
api_key:
secure: 2yLw0RPjJx6aQr8bc63HGv0q7RH8xwTviHt2caEge+fC9OvLiz/PNIIaKimt3uVKp2xalyojxJVEx2QHLbbjHLFI4vtXJnSW9Zng45N89tMKpuKuLqbwcOE9ika3Y+GxBm9Wk3FIjjDAS6B+2vdBSOaD331b+nyjqQY+qhxsUf/lh/QouPP7Q7YTswjOfDog45RSoGUexHsXqVcuvpEYhGIR3BxCk1IW4OCZ0qDcjrSEs+4FHnOcfxtHC+3V+Rr6rLezYSCAt5m/2dPb/GLON4vr96ildHu+y5Qa6csbcUD7MDKnJamRHpLY5hC5OMEJC6yACnLl5etLaN2d1lkdPJTZxi1lyPqTV4vxaWrXJaxT50VMbS9ekRWBw4I0lnUW2h1XoEveCJBKZ2c6O2+YlnUu1YNKmK488OPPQbidD1lgN5Q1P/KtTJCV0rRevb9DhOSqc5sszX8yBLLm8uLWn8jY4O3wnP50kHdMpg5vMJFd9OWiUS46ZIPe7suyZ/0jmOMRN6UBnMDZOF94R6GzjltrZAGshk3QD3ojLnzpYL7k754XcBv0mrvebt754YxMlT7IAGFMBqHlJuUK8rGdDy1U5d4m42y3yA2wsXQ+1XGSVG7bo0/AAFuxE/7SSgSiQY6lIRL0zr5WWDN2ItsJ35lsz5hbcX+8mHpLIuWx2H8=
skip_cleanup: true
on:
repo: StegSchreck/RatS
tags: true
#deploy:
# provider: releases
# api_key:
# secure: 2yLw0RPjJx6aQr8bc63HGv0q7RH8xwTviHt2caEge+fC9OvLiz/PNIIaKimt3uVKp2xalyojxJVEx2QHLbbjHLFI4vtXJnSW9Zng45N89tMKpuKuLqbwcOE9ika3Y+GxBm9Wk3FIjjDAS6B+2vdBSOaD331b+nyjqQY+qhxsUf/lh/QouPP7Q7YTswjOfDog45RSoGUexHsXqVcuvpEYhGIR3BxCk1IW4OCZ0qDcjrSEs+4FHnOcfxtHC+3V+Rr6rLezYSCAt5m/2dPb/GLON4vr96ildHu+y5Qa6csbcUD7MDKnJamRHpLY5hC5OMEJC6yACnLl5etLaN2d1lkdPJTZxi1lyPqTV4vxaWrXJaxT50VMbS9ekRWBw4I0lnUW2h1XoEveCJBKZ2c6O2+YlnUu1YNKmK488OPPQbidD1lgN5Q1P/KtTJCV0rRevb9DhOSqc5sszX8yBLLm8uLWn8jY4O3wnP50kHdMpg5vMJFd9OWiUS46ZIPe7suyZ/0jmOMRN6UBnMDZOF94R6GzjltrZAGshk3QD3ojLnzpYL7k754XcBv0mrvebt754YxMlT7IAGFMBqHlJuUK8rGdDy1U5d4m42y3yA2wsXQ+1XGSVG7bo0/AAFuxE/7SSgSiQY6lIRL0zr5WWDN2ItsJ35lsz5hbcX+8mHpLIuWx2H8=
# skip_cleanup: true
# on:
# repo: StegSchreck/RatS
# tags: true

0 comments on commit 119239d

Please sign in to comment.