From 3d6bc7a69dc8ee78629a26ce4d7080fc9d401993 Mon Sep 17 00:00:00 2001 From: "Gavin Yearwood (Advanced Research Computing)" Date: Fri, 7 Jun 2024 17:46:37 +0100 Subject: [PATCH] Addtion of standard linter --- .github/workflows/linter.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..5ea1920 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,34 @@ +name: Linter + +on: + push: + paths: + - '*.py' + - '*.md' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.10.13 + architecture: x64 + - name: Install flake8 + run: pip install flake8 + - name: Run flake8 + uses: suo/flake8-github-action@releases/v1 + with: + checkName: 'lint' # NOTE: this needs to be the same as the job name + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Markdown Linting Checkout + uses: avto-dev/markdown-lint@v1.5.0 + - name: Lint files + uses: docker://avtodev/markdown-lint:v1 # fastest way + with: + args: '*.md' + + +