Skip to content

notion_image_upload_test #364

notion_image_upload_test

notion_image_upload_test #364

name: notion_image_upload_test
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: '0 23 * * *' # Runs at 7 AM Singapore time (23:00 UTC) daily
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 tests
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
NOTION_WORKSPACE: ${{secrets.NOTION_WORKSPACE}}
NOTION_TOKEN: ${{secrets.NOTION_TOKEN}}
NOTION_URL: ${{secrets.NOTION_URL}}
# Disable pytest-vcr plugin (incompatible with urllib3 2.x; no tests here use VCR)
run: pytest tests/test_upload.py -v -s -p no:vcr