Files
libsignal/.github/workflows/lints.yml

38 lines
1.3 KiB
YAML

name: Lints
# This is in a separate job because we have shell scripts scattered across all our targets,
# *and* some of them have common dependencies.
on:
push:
branches: [ main ]
paths: ['**/*.sh', '**/*.py', '.github/workflows/*.yml']
pull_request:
paths: ['**/*.sh', '**/*.py', '.github/workflows/*.yml']
jobs:
lint:
name: Check helper scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
- run: sudo apt-get update && sudo apt-get install python3-flake8 python3-flake8-comprehensions python3-flake8-deprecated python3-flake8-import-order python3-flake8-quotes python3-mypy
- run: |
shopt -s globstar
shellcheck -- **/*.sh bin/verify_duplicate_crates bin/adb-run-test
- run: python3 -m flake8 .
- run: python3 -m mypy . --python-version 3.9 --strict
env:
# Some scripts modify sys.path to fetch from ./bin
MYPYPATH: ./bin
- name: Install actionlint
run: |
mkdir -p "$HOME/bin"
curl -sSfL https://raw.githubusercontent.com/rhysd/actionlint/e7d448ef7507c20fc4c88a95d0c448b848cd6127/scripts/download-actionlint.bash \
| bash -s -- 1.7.8 "$HOME/bin"
echo "$HOME/bin" >> "$GITHUB_PATH"
- run: actionlint