Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
---
name: PR check

on:
on: # yamllint disable-line rule:truthy
pull_request:

permissions:
contents: read

jobs:
test:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Merge base branch into PR branch
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git fetch origin "$BASE_REF"
git merge "origin/$BASE_REF" --no-edit

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: '3.11'

- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files --show-diff-on-failure --color always

- run: pip install tox
- run: tox
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ dist
.tox/
build/
__pycache__/
/docs/superpowers/
64 changes: 64 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.11
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: check-added-large-files
args: [--maxkb=500]
- id: check-symlinks
- id: mixed-line-ending
args: [--fix=lf]
- id: detect-private-key
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: no-commit-to-branch
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.38.0
hooks:
- id: yamllint
name: Lint YAML
args: [--format, parsable, --strict]
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2']
- repo: https://github.com/executablebooks/mdformat.git
rev: 1.0.0
hooks:
- id: mdformat
name: Format markdown
- repo: https://github.com/pycqa/isort
rev: 8.0.1
hooks:
- id: isort
name: isort (python)
args: [--profile, black, --filter-files]
- repo: https://github.com/psf/black
rev: 26.3.1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
files: ^oktaawscli/
additional_dependencies:
- types-requests
- boto3-stubs[sts,iam]
- repo: https://github.com/pylint-dev/pylint
rev: v4.0.5
hooks:
- id: pylint
name: pylint (Python Linting)
files: ^(oktaawscli|tests)/
args: [--rcfile=pylintrc, --output-format=colorized, --score=no]
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
language:
- python
- python
python:
- "3.6.5"
- 3.6.5
install:
- pip install -r requirements.txt
- pip install pylint
- pip install -r requirements.txt
- pip install pylint
script:
- pylint --errors-only oktaawscli
- pylint --errors-only oktaawscli
8 changes: 8 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# https://yamllint.readthedocs.io/en/stable/configuration.html#extending-the-default-configuration

extends: relaxed
rules:
line-length:
max: 120
hyphens: disable
Loading
Loading