Skip to content

Commit

Permalink
add pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
rlehfeld committed Apr 21, 2024
1 parent 6893bb8 commit be00810
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 0 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Pipeline Tests

on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
schedule:
- cron: 0 0 * * *

permissions:
contents: read

jobs:
flake8:
strategy:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U flake8 flake8-polyfill robotframework
- name: Analysing the code with flake8
run: |
flake8 $(git ls-files '*.py') --count --show-source --max-complexity=11 --statistics
pylint:
strategy:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U setuptools_scm setuptools pylint robotframework
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
robot-framework:
strategy:
matrix:
os: [ 'ubuntu-latest', 'windows-latest' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
robotframework-version: [ '5.0.1', '6.0.2', '6.1', '7.0', 'latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
pip install -U setuptools_scm setuptools
- name: Install robotframework latest
if: ${{ matrix.robotframework-version == 'latest' }}
run: |
pip install -U robotframework
- name: Install robotframework ${{ matrix.robotframework-version }}
if: ${{ matrix.robotframework-version != 'latest' }}
run: |
pip install robotframework==${{ matrix.robotframework-version }}
- name: Install RPyCRobotRemote
run: |
pip install -e .
- name: Executing Robot Framework Tests
run: |
python test/server &
robot test/ 2>&1
39 changes: 39 additions & 0 deletions .github/workflows/publish-to-pypi.yml
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://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#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@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: ${{ secrets.PYPI_API_USERNAME }}
password: ${{ secrets.PYPI_API_PASSWORD }}

0 comments on commit be00810

Please sign in to comment.