ubsuny / 23-Homework4G2

GNU General Public License v3.0
0 stars 6 forks source link

Output for pytest and linting #48

Closed tirthbha closed 1 year ago

tirthbha commented 1 year ago

How could we get the output for the pytest and linting using github action?

s4il3sh commented 1 year ago

You may check this code for linting:

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@v2

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.10' # Specify the Python version you want to use

    - name: Install linter
      run: pip install pylint

    - name: Lint spring_constant_unittest.py
      run: pylint spring_constant_unittest.py

in place of ''spring_constant_unitttest.py" you can add your file.

tirthbha commented 1 year ago

@s4il3sh I got it. But Im using flake8, while I'm running the code it shows error that we need to sort out. Do you know how to remove those error?

s4il3sh commented 1 year ago

Yes. It gives you clear suggestions of what is missing, indentation errors, or something like that. You need to make changes accordingly in your code.

tirthbha commented 1 year ago

Thank you for your response.