diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..168555b --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml deleted file mode 100644 index 2cba182..0000000 --- a/.github/workflows/dockerimage.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Docker Image CI - -on: [push] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - 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 diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml deleted file mode 100644 index 5639973..0000000 --- a/.github/workflows/pythonapp.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Python application - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - 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 diff --git a/.travis.yml b/.travis.yml index 1c3b987..af82400 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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