Skip to content

Merge pull request #56 from mwasilew/workflows/fix-test-job-submission #24

Merge pull request #56 from mwasilew/workflows/fix-test-job-submission

Merge pull request #56 from mwasilew/workflows/fix-test-job-submission #24

Workflow file for this run

name: Static analysis of scripts
on:
# run on pull requests to the main branch
pull_request:
branches: [main]
# run on pushes to the main branch
push:
branches: [main]
# only need permission to read repository; implicitely set all other
# permissions to none
permissions:
contents: read
# cancel in progress builds for this workflow triggered by the same ref
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
flake8:
name: Install and run Flake8 on Python scripts
runs-on: ubuntu-latest
steps:
- name: Install flake8
run: sudo apt update && sudo apt -y install flake8
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Flake8
run: flake8 scripts/*.py
pylint:
name: Install and run Pylint on Python scripts
runs-on: ubuntu-latest
steps:
- name: Install Pylint
run: sudo apt update && sudo apt -y install pylint
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Pylint (error mode)
run: pylint --errors-only scripts/*.py
shellcheck:
name: Install and run ShellCheck on shell scripts
runs-on: ubuntu-latest
steps:
- name: Install ShellCheck
run: sudo apt update && sudo apt -y install shellcheck
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run ShellCheck
run: shellcheck scripts/*.sh