Skip to content

🤦

🤦 #2504

Workflow file for this run

name: Check
on: [ push, pull_request ]
env:
PIP_DISABLE_PIP_VERSION_CHECK: yes
jobs:
fix_stupid_mistakes:
name: Fix stupid mistakes
runs-on: ubuntu-latest
if: github.ref_type == 'branch'
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.GH_PUSH_TOKEN }}
- name: Fix stupid mistakes
uses: ./.github/actions/fix_stupid_mistakes
mypy:
name: mypy
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: Pipfile.lock
- name: Cache
uses: pat-s/always-upload-cache@v3
with:
path: .mypy_cache
key: mypy-${{ github.repository }}-${{ github.ref }}-${{ github.sha }}
restore-keys: mypy-${{ github.repository }}-${{ github.ref }}-
- name: Install libcurl4-openssl-dev for compiling PycURL
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Install requirements
run: pip install -r pip-requirements.txt
- name: Install mypy + stuff required for checking the tests and setup.py
run: |
pip install -c pip-constraints.txt dulwich html5lib mypy numpy pytest pytest-is-running time-machine trove-classifiers
grep "^types-" pip-constraints.txt | xargs pip install
- name: Run mypy
run: mypy
flake8:
name: Flake8
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: Pipfile.lock
- name: Install Flake8
run: grep "^flake8-" pip-constraints.txt | xargs pip install -c pip-constraints.txt flake8 pep8-naming
- name: Run Flake8
run: flake8 --extend-ignore=SIM9
pylint:
name: Pylint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: Pipfile.lock
- name: Cache
uses: pat-s/always-upload-cache@v3
with:
path: ~/.cache/pylint
key: pylint-${{ github.repository }}-${{ github.ref }}-${{ github.sha }}
restore-keys: pylint-${{ github.repository }}-${{ github.ref }}-
- name: Install libcurl4-openssl-dev for compiling PycURL
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- name: Install requirements
run: pip install -r pip-requirements.txt
- name: Install Pylint + stuff required for checking the tests and setup.py
run: pip install -c pip-constraints.txt html5lib pylint pylint-pytest pytest time-machine trove-classifiers
- name: Run Pylint
run: pylint -r y -d fixme .
env:
DISABLE_PYSTON: 1
bandit:
name: Bandit
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: Pipfile.lock
- name: Install Bandit
run: pip install -c pip-constraints.txt bandit[toml]
- name: Run Bandit
run: bandit -rc pyproject.toml .
eslint:
name: ESLint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.19.0
cache: pnpm
- name: Cache
uses: pat-s/always-upload-cache@v3
with:
path: .eslintcache
key: eslint-${{ github.repository }}-${{ github.ref }}-${{ github.sha }}
restore-keys: eslint-${{ github.repository }}-${{ github.ref }}-
- name: Install ESLint
run: pnpm install
- name: Run ESLint
run: pnpm eslint --cache .
tsc:
name: tsc
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.19.0
cache: pnpm
- name: Install tsc
run: pnpm install
- name: Run tsc
run: |
pnpm tsc -p an_website
pnpm tsc -p scripts
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/[email protected]
env:
SHELLCHECK_OPTS: -x -o all
with:
version: v0.9.0
check_together: yes
ignore_names: screenfetch