Skip to content

Ensure key in rev renumber dict is a string #26

Ensure key in rev renumber dict is a string

Ensure key in rev renumber dict is a string #26

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
workflow_call:
inputs:
python_version:
required: true
type: string
default: '3.10'
ENABLE_BANDIT:
required: false
type: boolean
default: false
ENABLE_SONAR:
required: false
type: boolean
default: false
secrets:
SONAR_TOKEN:
description: 'SonarCloud project token'
required: false
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master", "python3" ]
pull_request:
branches: [ "master", "python3" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Show inputs
run: |
echo inputs: ${{ inputs }}
echo Python version: ${{ inputs.python_version }}
echo Enable Sonar: ${{ inputs.ENABLE_SONAR }}
- uses: actions/setup-python@v4
id: setup-python
with:
# python-version: ${{ inputs.python_version }}
python-version: '3.10'
- uses: actions/checkout@v3
- name: Cache Virtualenv
id: cache-venv
uses: actions/cache@v3
with:
path: venv
key: ${{ runner.os }}-golf-venv-${{ steps.setup-python.outputs.version }}-${{ hashFiles('requirements.txt') }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
- name: Install Virtualenv
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
ls venv/lib
ls venv/lib/python3.10
- name: Run Pycodestyle
run: |
source venv/bin/activate
pycodestyle *.py test/*.py
- name: Run Unit Tests
run: |
source venv/bin/activate
pytest test
- name: Run Bandit
if: $${{ inputs.ENABLE_BANDIT }}
run: |
source venv/bin/activate
bandit --ini tox.ini --exclude ./venv -r .
- name: SonarCloud scanner
uses: sonarsource/sonarcloud-github-action@master
if: ${{ inputs.ENABLE_SONAR }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}