From df03bc3ff6aef377129fc8257378064b458b9032 Mon Sep 17 00:00:00 2001 From: LizardByte-bot <108553330+LizardByte-bot@users.noreply.github.com> Date: Sat, 31 Aug 2024 04:47:20 +0000 Subject: [PATCH] chore: update global workflows --- .github/workflows/python-flake8.yml | 62 --------------------------- .github/workflows/yaml-lint.yml | 66 ----------------------------- 2 files changed, 128 deletions(-) delete mode 100644 .github/workflows/python-flake8.yml delete mode 100644 .github/workflows/yaml-lint.yml diff --git a/.github/workflows/python-flake8.yml b/.github/workflows/python-flake8.yml deleted file mode 100644 index 6077a957..00000000 --- a/.github/workflows/python-flake8.yml +++ /dev/null @@ -1,62 +0,0 @@ ---- -# This action is centrally managed in https://github.com//.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in -# the above-mentioned repo. - -# Lint python files with flake8. - -name: flake8 - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - flake8: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 # https://github.com/actions/setup-python - with: - python-version: '3.12' - - - name: Install dependencies - run: | - python -m pip install --upgrade \ - pip \ - setuptools \ - wheel \ - flake8 \ - nb-clean \ - nbqa[toolchain] - - - name: Test with flake8 - run: | - python -m flake8 \ - --color=always \ - --verbose - - - name: Test with nbqa - run: | - python -m nbqa flake8 \ - --color=always \ - --verbose \ - . - - - name: Test with nb-clean - run: | - output=$(find . -name '*.ipynb' -exec nb-clean check {} \;) - - # fail if there are any issues - if [ -n "$output" ]; then - echo "$output" - exit 1 - fi diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml deleted file mode 100644 index 023b836c..00000000 --- a/.github/workflows/yaml-lint.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -# This action is centrally managed in https://github.com//.github/ -# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in -# the above-mentioned repo. - -# Lint yaml files. - -name: yaml lint - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - yaml-lint: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Find additional files - id: find-files - run: | - # space separated list of files - FILES=.clang-format - - # empty placeholder - FOUND="" - - for FILE in ${FILES}; do - if [ -f "$FILE" ] - then - FOUND="$FOUND $FILE" - fi - done - - echo "found=${FOUND}" >> $GITHUB_OUTPUT - - - name: yaml lint - id: yaml-lint - uses: ibiqlik/action-yamllint@v3 - with: - # https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration - config_data: | - extends: default - rules: - comments: - level: error - line-length: - max: 120 - truthy: - # GitHub uses "on" for workflow event triggers - # .clang-format file has options of "Yes" "No" that will be caught by this, so changed to "warning" - allowed-values: ['true', 'false', 'on'] - check-keys: true - level: warning - file_or_dir: . ${{ steps.find-files.outputs.found }} - - - name: Log - run: | - cat "${{ steps.yaml-lint.outputs.logfile }}" >> $GITHUB_STEP_SUMMARY