From 7d9dabf27e37d96c879afda0f6d23fffdf920fec Mon Sep 17 00:00:00 2001 From: Ajeet yadav Date: Mon, 11 Mar 2024 00:54:16 +0530 Subject: [PATCH] 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