Skip to content

Commit

Permalink
Merge pull request #3 from ipdk-io/add-checkers
Browse files Browse the repository at this point in the history
Set up code owners and standard checkers
  • Loading branch information
ffoulkes authored Sep 10, 2024
2 parents 41bff1f + 8cd339c commit 53e59d5
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @ffoulkes @5abeel
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
---
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
87 changes: 87 additions & 0 deletions .github/workflows/checkers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: "Check modified files"

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
# If workflow is currently running, stop it and start a new one.
group: check-${{ github.ref }}
cancel-in-progress: true

permissions: read-all

jobs:
#---------------------------------------------------------------------
# 1-markdownlint
#---------------------------------------------------------------------
markdownlint:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get list of changed files
id: changed
uses: tj-actions/changed-files@v45
with:
files: |
**.md
- name: Lint markdown files
if: steps.changed.outputs.any_changed == 'true'
uses: nosborn/[email protected]
with:
files: ${{ steps.changed.outputs.all_changed_files }}
config_file: .markdownlint.json

#---------------------------------------------------------------------
# 2-bandit_check
#---------------------------------------------------------------------
bandit_check:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Check Python files
uses: tj-actions/[email protected]
with:
targets: |
**/**.py
options: "-v"

#---------------------------------------------------------------------
# 3-shellcheck
#---------------------------------------------------------------------
shellcheck:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get list of changed files
id: changed
uses: tj-actions/changed-files@v45
with:
files: |
**.sh
- name: Check for bash errors
if: steps.changed.outputs.any_changed == 'true'
run: |
shellcheck ${{ steps.changed.outputs.all_changed_files }}
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"MD013": false # allow line length > 80
}

0 comments on commit 53e59d5

Please sign in to comment.