Skip to content

Merge branch 'master' of https://github.com/Datapack-Hub/api #409

Merge branch 'master' of https://github.com/Datapack-Hub/api

Merge branch 'master' of https://github.com/Datapack-Hub/api #409

Workflow file for this run

name: Lint and Format
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
concurrency:
group: build-and-test
cancel-in-progress: true
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.11.x
cache: pip
architecture: x64
check-latest: true
- name: Install black
run: |
pip install ruff
- name: Run black
run: |
ruff format . --target-version py39
- uses: stefanzweifel/[email protected]
with:
commit_message: "Apply formatting"
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.11.x
cache: pip
architecture: x64
check-latest: true
- name: Install ruff
run: |
pip install ruff
- name: Run ruff
run: |
ruff . --fix
- uses: stefanzweifel/[email protected]
with:
commit_message: "Apply linting"
bandit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
with:
python-version: 3.11.x
cache: pip
architecture: x64
check-latest: true
- name: Install bandit
run: |
pip install bandit
- name: Run bandit
run: |
bandit . -r -s B105,B311