Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github workflows for standard lint checks #6

Closed
salty-ivy opened this issue May 24, 2024 · 9 comments
Closed

Add github workflows for standard lint checks #6

salty-ivy opened this issue May 24, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@salty-ivy
Copy link
Collaborator

salty-ivy commented May 24, 2024

Context

checkout .pre-commit-cofig.yaml.

we use the following lint tools on commit.

  • flake8
  • isort
  • black

Approach

add workflows in .github/workflows

@salty-ivy salty-ivy added the enhancement New feature or request label May 24, 2024
@AyushMishraa
Copy link

@DevilsAutumn I would like to work on this issue please assign me .

@DevilsAutumn
Copy link
Member

@AyushMishraa any updates on this?

@salty-ivy
Copy link
Collaborator Author

@DevilsAutumn what sorts of workflows you need? testing, linting and code cov? are following TDD

@DevilsAutumn
Copy link
Member

I think workflows mentioned in #94 is enough for now. not sure if we will be writing tests anytime soon.

@salty-ivy
Copy link
Collaborator Author

# .github/workflows/coverage.yml
name: Post coverage comment

on:
  workflow_run:
    workflows: ["Test"]
    types:
      - completed

jobs:
  test:
    name: Run tests & display coverage
    runs-on: ubuntu-latest
    if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
    permissions:
      # Gives the action the necessary permissions for publishing new
      # comments in pull requests.
      pull-requests: write
      # Gives the action the necessary permissions for editing existing
      # comments (to avoid publishing multiple comments in the same PR)
      contents: write
      # Gives the action the necessary permissions for looking up the
      # workflow that launched this workflow, and download the related
      # artifact that contains the comment to be published
      actions: read
    steps:
      # DO NOT run actions/checkout here, for security reasons
      # For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
      - name: Post comment
        uses: py-cov-action/python-coverage-comment-action@v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}

This would mostly used code coverage yml used in django-filter

@DevilsAutumn
Copy link
Member

we dont have tests so code coverage wont be useful?

@salty-ivy salty-ivy changed the title Add github workflows for standard code coverage Add github workflows for standard lint checks Oct 20, 2024
@Suraj1089
Copy link
Contributor

Suraj1089 commented Dec 8, 2024

@AyushMishraa any Update on this?

@Suraj1089
Copy link
Contributor

Hi @salty-ivy
Could you please assign this to me if there’s no further update from Ayush?
I believe we should add lint checks for pull requests. It will help to avoid merging poor formatted code.

@DevilsAutumn
Copy link
Member

@Suraj1089 we have already added ruff for the pre commit and workflow, so this issue is no longer valid.
But if you are interested we have a similar issue for frontend #207 , if you are interested.

@DevilsAutumn DevilsAutumn closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants