From e8c0c840c79070ed2318323a31ccdceb687bbeb8 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Sun, 10 Mar 2024 23:55:34 +0530 Subject: [PATCH 01/14] Added Pipeline and Precommit --- 01OS/poetry.lock | 50 ++++++++++++++++++++++++++++++++++++++- 01OS/pyproject.toml | 1 + 01OS/tests/__init__.py | 0 01OS/tests/sample_test.py | 7 ++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 01OS/tests/__init__.py create mode 100644 01OS/tests/sample_test.py diff --git a/01OS/poetry.lock b/01OS/poetry.lock index e29c468..748742c 100644 --- a/01OS/poetry.lock +++ b/01OS/poetry.lock @@ -1667,6 +1667,17 @@ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["jaraco.collections", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)", "zipp (>=3.17)"] +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + [[package]] name = "inquirer" version = "3.2.4" @@ -3291,6 +3302,21 @@ files = [ docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +[[package]] +name = "pluggy" +version = "1.4.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + [[package]] name = "plyer" version = "2.1.0" @@ -6617,6 +6643,28 @@ files = [ packaging = ">=21.3" Pillow = ">=8.0.0" +[[package]] +name = "pytest" +version = "8.1.1" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, + {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=1.4,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} + +[package.extras] +testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -8417,4 +8465,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<3.12" -content-hash = "6aa948d6a556517941cd0f399e509be40e273665886b5e2cd6479884a91076ad" +content-hash = "8be29df37abd9cbe801a8ef165d05db22311f58a6119d5676d8d6a706e155a1a" diff --git a/01OS/pyproject.toml b/01OS/pyproject.toml index 593f1b9..2ba825b 100644 --- a/01OS/pyproject.toml +++ b/01OS/pyproject.toml @@ -41,6 +41,7 @@ build-backend = "poetry.core.masonry.api" black = "^23.10.1" isort = "^5.12.0" pre-commit = "^3.6.2" +pytest = "^8.1.1" [tool.black] target-version = ['py311'] diff --git a/01OS/tests/__init__.py b/01OS/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/01OS/tests/sample_test.py b/01OS/tests/sample_test.py new file mode 100644 index 0000000..0cd45d5 --- /dev/null +++ b/01OS/tests/sample_test.py @@ -0,0 +1,7 @@ +def hello_world(): + return "Hello, World!" + + +# A test function to assert that hello_world() returns the expected string +def test_hello_world(): + assert hello_world() == "Hello, World!" From 7d2f76a9302b3e1ddcdcb404b05fab55593f1059 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Sun, 10 Mar 2024 23:55:49 +0530 Subject: [PATCH 02/14] Added Pipeline and Precommit --- .github/ISSUE_TEMPLATE/bug_report.md | 31 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++++++++++ .github/workflows/test.yml | 29 +++++++++++++++++++++ .pre-commit-config.yaml | 26 +++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/test.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..7699178 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Python Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4882fad --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Pre-commit + +on: + pull_request: + branches: [main] + +concurrency: + group: "test" + cancel-in-progress: false + +jobs: + pre-commit: + name: Pre-Commit + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install Poetry Package + run: | + pip install --upgrade pip + pip install poetry==1.3.2 + poetry config virtualenvs.create false + poetry install --no-interaction --with dev + - name: Run Pre-commit + run: pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..aa83883 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,26 @@ +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: "v0.2.2" + hooks: + - id: ruff + args: ["--fix"] + - id: ruff-format +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: fix-encoding-pragma + args: [--remove] + - id: check-yaml + - id: debug-statements + language_version: python3 +- repo: local + hooks: + - id: pytest + name: pytest + entry: pytest tests + language: system + types: [python] + pass_filenames: false + always_run: true From e9401c253530b3a1b8cb3e3fa6717a15773280e8 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Sun, 10 Mar 2024 23:59:24 +0530 Subject: [PATCH 03/14] Updated Pytest path --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa83883..6d514b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: hooks: - id: pytest name: pytest - entry: pytest tests + entry: pytest 01OS/tests language: system types: [python] pass_filenames: false From 842123599267463137b85d688f8930b5cfa5ad75 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:03:29 +0530 Subject: [PATCH 04/14] update path for poetry --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4882fad..d2d800c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,7 @@ jobs: with: python-version: "3.11" - name: Install Poetry Package + working-directory: 01OS run: | pip install --upgrade pip pip install poetry==1.3.2 From 5d5623dbac0960f95fd4ed5cf19269fc1f6745af Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:10:35 +0530 Subject: [PATCH 05/14] Added python version matrix --- .github/workflows/lint.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/test.yml | 17 +++++++++++------ 2 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..718520c --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: Pre-commit + +on: + pull_request: + branches: [main] + +concurrency: + group: "lint" + cancel-in-progress: false + +jobs: + pre-commit: + name: Pre-Commit + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install Poetry Package + working-directory: 01OS + run: | + pip install --upgrade pip + pip install poetry==1.3.2 + poetry config virtualenvs.create false + poetry install --no-interaction --with dev + - name: Run Pre-commit + run: pre-commit run --all-files diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2d800c..3d347cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,21 @@ -name: Pre-commit +name: Run Test on: - pull_request: - branches: [main] + # pull_request: + # branches: [main] + push: concurrency: group: "test" cancel-in-progress: false jobs: - pre-commit: - name: Pre-Commit + pytest: + name: Run Test runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] steps: - name: Checkout uses: actions/checkout@v4 @@ -27,4 +31,5 @@ jobs: poetry config virtualenvs.create false poetry install --no-interaction --with dev - name: Run Pre-commit - run: pre-commit run --all-files + working-directory: 01OS + run: pytest test From 4f4291ab41d78583457f248340b6ef50ce62a6bf Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:18:02 +0530 Subject: [PATCH 06/14] Added portaudio --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d347cc..e6d8d01 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,13 +19,14 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Python + - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: ${{ matrix.python-version }} - name: Install Poetry Package working-directory: 01OS run: | + apt-get install portaudio19-dev python-all-dev pip install --upgrade pip pip install poetry==1.3.2 poetry config virtualenvs.create false From a83f195d4c9d2cd0875632d28359f13730a64975 Mon Sep 17 00:00:00 2001 From: Ajeet Yadav Date: Mon, 11 Mar 2024 00:18:57 +0530 Subject: [PATCH 07/14] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6d8d01..bbf9ac1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: - name: Install Poetry Package working-directory: 01OS run: | - apt-get install portaudio19-dev python-all-dev + sudo apt-get install portaudio19-dev python-all-dev pip install --upgrade pip pip install poetry==1.3.2 poetry config virtualenvs.create false From 4fc92504f49139d2bf652730d552969ac7c33461 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:23:59 +0530 Subject: [PATCH 08/14] Added caching --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bbf9ac1..a176ff2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,6 +16,9 @@ jobs: strategy: matrix: python-version: ["3.9", "3.10", "3.11"] + defaults: + run: + working-directory: 01OS steps: - name: Checkout uses: actions/checkout@v4 @@ -23,14 +26,13 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: "poetry" - name: Install Poetry Package - working-directory: 01OS run: | sudo apt-get install portaudio19-dev python-all-dev pip install --upgrade pip pip install poetry==1.3.2 poetry config virtualenvs.create false poetry install --no-interaction --with dev - - name: Run Pre-commit - working-directory: 01OS - run: pytest test + - name: Run Pytest + run: pytest tests From 19eb11afbd6a26a6d4f0844cc3fd2f223244e0e9 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:29:29 +0530 Subject: [PATCH 09/14] Installing poetry using pipx --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a176ff2..d9a92d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Install poetry + run: pipx install poetry - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: @@ -35,4 +37,4 @@ jobs: poetry config virtualenvs.create false poetry install --no-interaction --with dev - name: Run Pytest - run: pytest tests + run: poetry run pytest tests From 770028e79841e0fe4852dfe9076fa69ca7d9d872 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:37:03 +0530 Subject: [PATCH 10/14] added os matrix --- .github/workflows/test.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9a92d7..240c437 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,29 +12,43 @@ concurrency: jobs: pytest: name: Run Test - runs-on: ubuntu-latest + strategy: + fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.11"] defaults: run: working-directory: 01OS + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v4 + - name: Install poetry run: pipx install poetry + - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: "poetry" + + - name: Installing Portaudio in Ubuntu + if: ${{ matrix.os }} == "ubuntu-latest" + run: sudo apt-get install portaudio19-dev python-all-dev + + - name: Installing Portaudio in Mac + if: ${{ matrix.os }} == "mac-latest" + run: brew install portaudio + - name: Install Poetry Package run: | - sudo apt-get install portaudio19-dev python-all-dev pip install --upgrade pip pip install poetry==1.3.2 poetry config virtualenvs.create false poetry install --no-interaction --with dev + - name: Run Pytest run: poetry run pytest tests From d5fd66a84eee1dabc3d5c96dc4afd8786e6b6a49 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:40:23 +0530 Subject: [PATCH 11/14] changed condition --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 240c437..0947a36 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,11 +36,11 @@ jobs: cache: "poetry" - name: Installing Portaudio in Ubuntu - if: ${{ matrix.os }} == "ubuntu-latest" + if: matrix.os == 'ubuntu-latest' run: sudo apt-get install portaudio19-dev python-all-dev - name: Installing Portaudio in Mac - if: ${{ matrix.os }} == "mac-latest" + if: matrix.os == 'mac-latest' run: brew install portaudio - name: Install Poetry Package From 49a38c67200ccc32d02fbe831ed1e59c873ca840 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:47:47 +0530 Subject: [PATCH 12/14] renamed OS --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0947a36..3d87d98 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,7 @@ jobs: run: sudo apt-get install portaudio19-dev python-all-dev - name: Installing Portaudio in Mac - if: matrix.os == 'mac-latest' + if: matrix.os == 'macos-latest' run: brew install portaudio - name: Install Poetry Package From 7d9dabf27e37d96c879afda0f6d23fffdf920fec Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:54:16 +0530 Subject: [PATCH 13/14] Added comments --- .github/workflows/lint.yml | 18 +++++++++++++----- .github/workflows/test.yml | 11 ++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 718520c..b48a61c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,26 +5,34 @@ on: branches: [main] concurrency: - group: "lint" + group: "lint" # Concurrency group named "lint" cancel-in-progress: false jobs: pre-commit: name: Pre-Commit - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Run the job on the latest version of Ubuntu + steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4 # Checkout the repository code + - name: Setup Python uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.11" # Set up Python version 3.11 for the job + + # Install Portaudio on Ubuntu + - name: Installing Portaudio in Ubuntu + run: sudo apt-get install portaudio19-dev python-all-dev + - name: Install Poetry Package - working-directory: 01OS + working-directory: 01OS # Set the working directory to "01OS" run: | pip install --upgrade pip pip install poetry==1.3.2 poetry config virtualenvs.create false poetry install --no-interaction --with dev + - name: Run Pre-commit run: pre-commit run --all-files diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3d87d98..34dde0f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,7 @@ name: Run Test on: - # pull_request: - # branches: [main] - push: + push: # Trigger the workflow on push events concurrency: group: "test" @@ -18,10 +16,13 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ["3.11"] + defaults: run: working-directory: 01OS + runs-on: ${{ matrix.os }} + steps: - name: Checkout uses: actions/checkout@v4 @@ -35,14 +36,17 @@ jobs: python-version: ${{ matrix.python-version }} cache: "poetry" + # Install Portaudio on Ubuntu - name: Installing Portaudio in Ubuntu if: matrix.os == 'ubuntu-latest' run: sudo apt-get install portaudio19-dev python-all-dev + # Install Portaudio on macOS using Homebrew - name: Installing Portaudio in Mac if: matrix.os == 'macos-latest' run: brew install portaudio + # Install Poetry and project dependencies - name: Install Poetry Package run: | pip install --upgrade pip @@ -50,5 +54,6 @@ jobs: poetry config virtualenvs.create false poetry install --no-interaction --with dev + # Run pytest - name: Run Pytest run: poetry run pytest tests From d882f8ccce31cdc6910fac4fe54b0b07350340e5 Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:56:14 +0530 Subject: [PATCH 14/14] Changed Trigger --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34dde0f..2d6b051 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,9 @@ name: Run Test on: - push: # Trigger the workflow on push events + pull_request: + branches: [main] + # push: # Trigger the workflow on push events concurrency: group: "test"