diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65567d83794e..763e84beff54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,37 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true jobs: + deps: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + - name: Install platform dependencies + run: | + sudo apt -y update + sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config libxml2-dev libxslt-dev + - uses: actions/setup-python@v4 + with: + python-version-file: '.python-version' + - name: pip cache + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: pip-${{ runner.os }} + - name: Cache built Python environment + uses: actions/cache@v3 + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }} + - name: Install Python dependencies + run: | + pip install -U setuptools wheel + pip install 'pip @ git+https://github.com/pypa/pip@refs/pull/11897/head' + pip install -r requirements.txt --no-deps + pip install -r requirements/dev.txt + pip check test: + needs: deps strategy: matrix: include: @@ -54,25 +84,24 @@ jobs: - name: Install platform dependencies run: | sudo apt -y update - sudo apt -y install libcurl4-openssl-dev libssl-dev pkg-config + sudo apt -y install libxml2 libxslt1.1 libcurl4 - uses: actions/setup-python@v4 with: python-version-file: '.python-version' - cache: 'pip' - cache-dependency-path: | - requirements.txt - requirements/*.txt - - name: Cache common Python cache paths - uses: actions/cache@v3 + - name: Restore built Python environment from deps + uses: actions/cache/restore@v3 with: - path: | - .cache - .mypy_cache - ${{ env.pythonLocation }} + path: ${{ env.pythonLocation }} key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }} + - name: mypy cache + uses: actions/cache@v3 + with: + path: .mypy_cache + key: mypy-${{ runner.os }}-${{ hashFiles('requirements.txt', 'requirements/*.txt') }} - name: Install Python dependencies run: | - pip install -U pip setuptools wheel + pip install -U setuptools wheel + pip install 'pip @ git+https://github.com/pypa/pip@refs/pull/11897/head' pip install -r requirements.txt --no-deps pip install -r requirements/dev.txt pip check