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

test: make a test configuration file which will work under GitHub branch protection rule. #16

Open
ksauraj opened this issue Jan 15, 2024 · 4 comments

Comments

@ksauraj
Copy link
Owner

ksauraj commented Jan 15, 2024

We can utilise GitHub branch protection rule and make a github workflow file to run some tests before merging a pull request.

You can utilise tools like unittest to do so.

This might be a sample for .github/workflows/test.yml file

name: Run Tests

on:
  push:
    branches:
      - main  # Adjust the branch name as needed

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.8  # Adjust the Python version as needed

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt  # If you have a requirements file

      - name: Run tests
        run: python -m unittest discover -v
@praptisharma28
Copy link

Assign me @ksauraj , will make!

@ksauraj
Copy link
Owner Author

ksauraj commented Jan 16, 2024

Hello @praptisharma28 I really like your interest, but since you are actually working on another issue, I will not be able to assign you this at the moment, but once you complete the prior one, I'll assign you this if available.

@hemant933
Copy link

assign it to me

@ksauraj
Copy link
Owner Author

ksauraj commented Jan 17, 2024

assign it to me

Sure, I'm assigning this to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants