unit_tests #370
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
| name: unit_tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [master, dev] | |
| paths-ignore: | |
| - 'Docs/**' # Docs folder in root of repo | |
| - '**/*.md' # .md files anywhere in the repo | |
| - '**/LICENSE' # LICENSE files anywhere in the repo | |
| - '**/.gitignore' # .gitignore files anywhere in the repo | |
| - '**/*.cursorrules' # .cursorrules files anywhere in the repo | |
| - '**/.cursorrules' # .cursorrules files anywhere in the repo | |
| pull_request: | |
| branches: [master, dev] | |
| paths-ignore: | |
| - 'Docs/**' # Docs folder in root of repo | |
| - '**/*.md' # .md files anywhere in the repo | |
| - '**/LICENSE' # LICENSE files anywhere in the repo | |
| - '**/.gitignore' # .gitignore files anywhere in the repo | |
| - '**/.cursorrules' # .cursorrules files anywhere in the repo | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["build"] | |
| types: [completed] | |
| env: | |
| BUILD_PYTHON_VERSION: 3.9 | |
| BUILD_POETRY_VERSION: 2.1.3 | |
| PACKAGE_NAME: csv2notion_neo | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ env.BUILD_PYTHON_VERSION }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.BUILD_PYTHON_VERSION }} | |
| - name: Install setuptools | |
| run: pip install setuptools==80.9.0 | |
| - name: Set up Poetry ${{ env.BUILD_POETRY_VERSION }} | |
| uses: abatilo/[email protected] | |
| with: | |
| poetry-version: ${{ env.BUILD_POETRY_VERSION }} | |
| - name: Install poetry-plugin-export | |
| run: poetry self add poetry-plugin-export==1.9.0 | |
| - name: Cache Poetry dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| .venv | |
| ~/.cache/pypoetry | |
| key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}- | |
| - name: Install the necessary libraries to run csv2notion_neo | |
| run: | | |
| poetry config virtualenvs.create false | |
| poetry install --no-root | |
| - name: Run comprehensive tests | |
| # Disable pytest-vcr plugin: it imports urllib3.connectionpool.VerifiedHTTPSConnection | |
| # which was removed in urllib3 2.x. No tests in this run use VCR. | |
| run: pytest tests/test_comprehensive.py -v -s --tb=long -p no:vcr |