feat: enhance package management and search ranking with RapidFuzz in… #124
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A descriptive name for your CI workflow | |
| name: Python CI | |
| # Controls when the workflow will run | |
| on: | |
| # Triggers the workflow on push events for the "main" branch | |
| push: | |
| branches: [ "main" ] | |
| # Triggers the workflow on pull request events targeting the "main" branch | |
| pull_request: | |
| branches: [ "main" ] | |
| # A workflow run is made up of one or more jobs | |
| jobs: | |
| build: | |
| # The type of virtual machine to run the job on | |
| runs-on: ubuntu-latest | |
| # Define a matrix strategy to test against multiple Python versions | |
| strategy: | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11"] | |
| # A sequence of tasks that will be executed as part of the job | |
| steps: | |
| # 1. Checks-out your repository so your job can access it | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # 2. Sets up the specific version of Python from the matrix | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # 3. Installs dependencies | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 black | |
| # This command installs your package in editable mode along with its dependencies | |
| pip install -e . | |
| # 4. Checks for syntax errors and undefined names with a linter | |
| - name: Lint with Flake8 | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| # 5. Checks if the code is correctly formatted with Black | |
| # The '--check' flag fails the job if files need reformatting. | |
| - name: Check formatting with Black | |
| run: | | |
| black --check . |