From 7f32e28e508165ba06d1f8a3a13ee9fc0a5ea0fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20H=C3=A9risson?= Date: Sat, 2 Mar 2024 12:10:37 +0100 Subject: [PATCH] build: replace check action --- .github/workflows/check.yml | 36 ------------------------------------ .github/workflows/lint.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml deleted file mode 100644 index ea7a98f..0000000 --- a/.github/workflows/check.yml +++ /dev/null @@ -1,36 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Check (lint + security) - -on: - - push: - branches: [ main, master, dev ] - paths: - - '**.py' - pull_request: - branches: [ main, master ] - -jobs: - - Check: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install flake8 - run: pip install flake8 - - name: Lint with flake8 - run: flake8 --exclude setup.py . -# continue-on-error: true - - name: Install bandit - run: pip install bandit - - name: Check security issues with bandit - run: bandit . -# continue-on-error: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..679629e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,27 @@ +name: Lint + +on: + push: + paths: + - '*.py' + - '!**/tests/**' + +jobs: + flake8_py3: + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.7.4 + architecture: x64 + - name: Checkout PyTorch + uses: actions/checkout@master + - name: Install flake8 + run: pip install flake8 + - name: Run flake8 + uses: suo/flake8-github-action@releases/v1 + with: + checkName: 'flake8_py3' # NOTE: this needs to be the same as the job name + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file