Skip to content

chore: auto-format shell #211

chore: auto-format shell

chore: auto-format shell #211

Workflow file for this run

name: Lint
on:
pull_request:
push:
branches:
- main
concurrency:
group: 'ci-${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
defaults:
run:
shell: sh -ex {0}
jobs:
check_linters:
strategy:
fail-fast: false
matrix:
env: [check_format]
name: Check ${{ matrix.env }}
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox
sudo snap install shfmt
- name: Print version
run: python3 --version
- name: Test
env:
# matrix env: not to be confused w/environment variables or testenv
TOXENV: ${{ matrix.env }}
run: tox
- name: Formatting check failed
if: failure()
run: |
echo "[31mResolve formatting errors with `tox -e do_format` (requires shfmt to format shell).\e[0m"
echo "[31mFor mypy and pylint failures see the warnings above.\e[0m"
doc:
strategy:
fail-fast: false
name: Check docs
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install RTD Python Version
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11.9'
- name: Install dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install tox
- name: Spellcheck
run: |
tox
env:
TOXENV: doc-spelling
- name: Build docs
env:
TOXENV: doc
run: |
tox
shell-lint:
name: Shell Lint
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install ShellCheck
run: |
sudo apt-get update
sudo apt install shellcheck
- name: Run ShellCheck
run: |
shellcheck --color=always ./tools/ds-identify
workflow-lint:
name: GitHub Action and Workflow Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: reviewdog/action-actionlint@83e4ed25b168066ad8f62f5afbb29ebd8641d982 # v1.69.1
with:
fail_level: any