🗨 delete deleted quotes from cache #3410
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check | |
| on: | |
| push: | |
| tags: [ v* ] | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| PIP_DISABLE_PIP_VERSION_CHECK: yes | |
| jobs: | |
| fix_stupid_mistakes: | |
| name: Fix stupid mistakes | |
| runs-on: ubuntu-24.04 | |
| 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: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| cache: pip | |
| cache-dependency-path: Pipfile.lock | |
| - uses: extractions/setup-just@v3 | |
| with: | |
| just-version: "1.40" | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: lts | |
| - name: Install required stuff | |
| run: | | |
| sudo apt-get install --update -y libcurl4-openssl-dev | |
| pip install -r pip-requirements.txt | |
| pip install -c pip-constraints.txt autoflake black isort | |
| - name: Run autoflake | |
| run: autoflake --recursive --in-place --remove-all-unused-imports --remove-unused-variables --remove-duplicate-keys . | |
| - name: Run isort | |
| run: isort . | |
| - name: Run Black | |
| run: black . | |
| - name: Install dprint | |
| run: curl -sSf https://dprint.dev/install.sh | sh -s 0.50.1 | |
| - name: Run dprint | |
| run: ~/.dprint/bin/dprint fmt --diff | |
| - name: Install dart-sass | |
| uses: ./.github/actions/install_dart_sass | |
| - name: Generate snow | |
| run: sass -s compressed --random-seed 0 style/snow.scss style/snow.css | |
| - name: Build JS & CSS | |
| run: just clean && just build | |
| - name: Format Justfile | |
| run: just --fmt --unstable | |
| - name: Generate humans.txt | |
| run: ./scripts/humans.py | |
| - name: Sort methods | |
| run: ./scripts/sort_python_code.py | |
| - name: Generate config.ini.default | |
| run: python3 -m an_website --save-config-to example-configurations/config.ini.default -c | |
| - name: Update env | |
| run: | | |
| D=$(python -c "print((_:=__import__('datetime')).datetime.now(tz=_.timezone.utc).replace(minute=0, second=0, microsecond=0).isoformat())") | |
| echo "GIT_AUTHOR_DATE=${D}" >> "${GITHUB_ENV}" | |
| echo "GIT_COMMITTER_DATE=${D}" >> "${GITHUB_ENV}" | |
| - name: Push changes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_author: Bot <> | |
| commit_message: "🤦" | |
| commit_user_name: Bot | |
| commit_user_email: | |
| mypy: | |
| name: mypy | |
| runs-on: ubuntu-24.04 | |
| 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 install --update -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 zopflipy backports.zstd | |
| grep "^types-" pip-constraints.txt | xargs pip install | |
| - name: Run mypy | |
| run: mypy | |
| flake8: | |
| name: Flake8 | |
| runs-on: ubuntu-24.04 | |
| 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-24.04 | |
| 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 install --update -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 cryptography dulwich html5lib pylint pylint-pytest pytest setuptools time-machine trove-classifiers zopflipy backports.zstd | |
| - name: Run Pylint | |
| run: pylint -r y -d fixme . | |
| env: | |
| DISABLE_PYSTON: 1 | |
| bandit: | |
| name: Bandit | |
| runs-on: ubuntu-24.04 | |
| 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 . | |
| stylelint: | |
| name: Stylelint | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Cache | |
| uses: pat-s/always-upload-cache@v3 | |
| with: | |
| path: .stylelintcache | |
| key: stylelint-${{ github.repository }}-${{ github.ref }}-${{ github.sha }} | |
| restore-keys: stylelint-${{ github.repository }}-${{ github.ref }}- | |
| - name: Install Stylelint | |
| run: pnpm install | |
| - name: Run Stylelint | |
| run: pnpm stylelint --cache style/ | |
| eslint: | |
| name: ESLint | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Enable corepack | |
| run: corepack enable | |
| - 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-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Install tsc | |
| run: pnpm install | |
| - name: Run tsc | |
| run: | | |
| pnpm tsc | |
| pnpm tsc -p an_website | |
| shellcheck: | |
| name: ShellCheck | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Run ShellCheck | |
| uses: ludeeus/[email protected] | |
| env: | |
| SHELLCHECK_OPTS: -xo all | |
| with: | |
| version: v0.11.0 | |
| check_together: yes | |
| ignore_names: screenfetch |