Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
merge_group:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
id-token: write
contents: read
Expand All @@ -23,16 +27,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base-cache
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache-suffix: lint
- name: Validate lockfile
run: uv lock --check

check-licenses:
strategy:
matrix:
python-version: [ "3.12" ]
runs-on: ubuntu-latest
needs: [setup]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base-cache
Expand All @@ -46,12 +54,16 @@ jobs:
matrix:
python-version: ["3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
needs: [setup, changelog]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base-cache
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache-suffix: lint
- name: Install lint dependencies
run: uv sync --locked --only-group lint
- name: Lint
run: make check

Expand All @@ -77,7 +89,6 @@ jobs:
matrix:
python-version: ["3.11", "3.12", "3.13"]
runs-on: opensource-linux-8core
needs: [setup, lint]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/base-cache
Expand All @@ -103,7 +114,6 @@ jobs:
matrix:
python-version: ["3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
needs: [setup, lint]
steps:
- uses: actions/checkout@v4
- name: Install uv
Expand Down Expand Up @@ -144,7 +154,6 @@ jobs:
- extra: xlsx
uv-extras: "--extra xlsx"
runs-on: opensource-linux-8core
needs: [setup, lint, test_unit_no_extras]
steps:
- uses: actions/checkout@v4
- name: Install uv
Expand All @@ -158,7 +167,17 @@ jobs:
- name: Install extra dependencies
run: |
uv sync --locked ${{ matrix.uv-extras }} --group test
- name: Install document system dependencies
if: matrix.extra != 'pdf-image'
run: |
packages=(libmagic-dev)
case "${{ matrix.extra }}" in
# The doc/ppt tests exercise legacy formats through LibreOffice.
docx|pptx) packages+=(libreoffice) ;;
esac
bash scripts/ci/install-system-deps.sh --packages-only "${packages[@]}"
- name: Install system dependencies
if: matrix.extra == 'pdf-image'
run: |
bash scripts/ci/install-system-deps.sh
- name: Test
Expand All @@ -173,7 +192,6 @@ jobs:
matrix:
python-version: ["3.12"]
runs-on: opensource-linux-8core
needs: [setup, lint]
steps:
# actions/checkout MUST come before auth
- uses: 'actions/checkout@v4'
Expand Down Expand Up @@ -240,7 +258,6 @@ jobs:
matrix:
python-version: ["3.12"]
runs-on: ubuntu-latest
needs: [setup, lint]
steps:
- uses: 'actions/checkout@v4'
- uses: ./.github/actions/base-cache
Expand All @@ -258,7 +275,6 @@ jobs:
matrix:
python-version: ["3.12"]
runs-on: ubuntu-latest
needs: [setup, lint]
steps:
- uses: 'actions/checkout@v4'
- uses: ./.github/actions/base-cache
Expand Down Expand Up @@ -291,7 +307,6 @@ jobs:
# (Using the virtualenv to get pytest)
test_dockerfile:
runs-on: opensource-linux-8core
needs: [ setup, lint ]
steps:
- uses: actions/checkout@v4
- name: Test Dockerfile
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.27.19-dev0

### Maintenance

- **Start CI tests without waiting for setup and lint.** Lint installs only its own dependency group, extras jobs install only the system packages their tests use, and a new push cancels the pull request's previous CI run.

## 0.27.18

### Fixes
Expand Down
5 changes: 5 additions & 0 deletions scripts/ci/install-system-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ install_packages() {
}

retry_download apt-get "${apt_options[@]}" -o APT::Update::Error-Mode=any update
if [[ "${1:-}" == "--packages-only" ]]; then
shift
install_packages "$@"
exit 0
fi
install_packages libmagic-dev poppler-utils libreoffice
# Avoid add-apt-repository's implicit, unbounded index download.
retry_download add-apt-repository --no-update -y ppa:alex-p/tesseract-ocr5
Expand Down
2 changes: 1 addition & 1 deletion unstructured/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.27.18" # pragma: no cover
__version__ = "0.27.19-dev0" # pragma: no cover
Loading