Improve clip upload failure errors (#2576) #2651
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Package | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: {} | |
| env: | |
| PYTHON_VERSION: "3.13.5" | |
| jobs: | |
| bandit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| test: "true" | |
| - name: Run bandit | |
| run: bandit -c pyproject.toml -r instagrapi | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| test: "true" | |
| - name: Run Ruff | |
| run: | | |
| ruff check --output-format=github . | |
| ruff format --check . | |
| test-compat: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| test: "true" | |
| - name: Run compatibility smoke tests | |
| run: | | |
| pytest -sv \ | |
| tests/regression/test_extractors.py::ExtractorsRegressionTestCase \ | |
| tests/regression/test_public.py::PublicRegressionTestCase \ | |
| tests/regression/test_public.py::PrivateGraphQLRequestRegressionTestCase \ | |
| tests/regression/test_direct.py::DirectMixinRegressionTestCase \ | |
| tests/regression/test_challenge.py::ChallengeRegressionTestCase \ | |
| tests/regression/test_comments.py::CommentRepliesRegressionTestCase \ | |
| tests/regression/test_current_app_profile.py::CurrentAppProfileRegressionTestCase \ | |
| tests/regression/test_auth_story.py::AuthAndStoryRegressionTestCase \ | |
| tests/regression/test_download.py::DownloadRegressionTestCase \ | |
| tests/regression/test_notes.py::NoteMixinRegressionTestCase \ | |
| tests/regression/test_location.py::LocationMixinRegressionTestCase \ | |
| tests/regression/test_media.py::UserMediasGraphQLRegressionTestCase \ | |
| tests/regression/test_user.py::UserMixinRegressionTestCase \ | |
| tests/regression/test_timeline.py::TimelineRegressionTestCase \ | |
| tests/regression/test_story_configure.py::StoryConfigureRegressionTestCase \ | |
| tests/regression/test_video_metadata.py::VideoMetadataRegressionTestCase \ | |
| tests/regression/test_upload.py::UploadRegressionTestCase | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref == 'refs/heads/master') | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| test: "true" | |
| - name: Build Docs | |
| run: mkdocs build --strict | |
| # upload artifact for dev build | |
| - name: Upload coverage results artifact | |
| if: github.ref != 'refs/heads/master' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: docs-site | |
| path: site/ | |
| update-dev-docs: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install dependencies | |
| uses: ./.github/actions/install-dependencies | |
| with: | |
| test: "true" | |
| - name: Push documentation changes | |
| uses: ./.github/actions/publish-docs-with-mike | |
| with: | |
| version_name: dev |