diff --git a/.github/actions/unittesting/action.yml b/.github/actions/unittesting/action.yml index 39b3d6c3..26c6708a 100644 --- a/.github/actions/unittesting/action.yml +++ b/.github/actions/unittesting/action.yml @@ -49,7 +49,7 @@ runs: shell: ${{ inputs.shell-type }} - name: Upload pytest results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.location.outputs.artifact }} path: "test/${{ steps.location.outputs.artifact }}.xml" diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index 4a52aced..123d7ad9 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -3,6 +3,11 @@ name: Building docs on: workflow_call: inputs: + actions-ref: + description: "Version of actions, normally the same as workflow" + required: false + type: string + default: "" python-version: description: "Python version to use" default: "3.9" @@ -71,6 +76,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} + cache: "pip" - name: Install pandoc & texlive if: ${{ inputs.install-tex == 'true' }} @@ -83,7 +89,6 @@ jobs: dvipng \ texlive-pictures \ latexmk - # todo: consider adding cache with separate restore/save - name: Install dependencies timeout-minutes: 20 run: | @@ -91,8 +96,16 @@ jobs: pip install -e . -U -r ${{ inputs.requirements-file }} -f ${TORCH_URL} pip list - # TODO: re-enable after the external usage is resolved, see #51 - # - uses: ./.github/actions/pip-list + - name: Pull reusable 🤖 actions️ + if: ${{ inputs.actions-ref != '' }} + uses: actions/checkout@v4 + with: + ref: ${{ inputs.actions-ref }} + path: .cicd + repository: Lightning-AI/utilities + - name: Print 🖨️ dependencies + if: ${{ inputs.actions-ref != '' }} + uses: ./.cicd/.github/actions/pip-list - name: Build documentation working-directory: ${{ inputs.docs-dir }} @@ -104,7 +117,7 @@ jobs: if: startsWith(github.event_name, 'pull_request') run: echo "KEEP_DAYS=7" >> $GITHUB_ENV - name: Upload built docs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: docs-${{ matrix.target }}-${{ github.sha }} path: ${{ inputs.docs-dir }}/build/ diff --git a/.github/workflows/check-typing.yml b/.github/workflows/check-typing.yml index d1f53b6d..49003d06 100644 --- a/.github/workflows/check-typing.yml +++ b/.github/workflows/check-typing.yml @@ -5,8 +5,9 @@ on: inputs: actions-ref: description: "Version of actions, normally the same as workflow" - required: true + required: false type: string + default: "" python-version: description: "Python version to use" default: "3.9" @@ -50,12 +51,14 @@ jobs: pip list - name: Pull reusable 🤖 actions️ + if: ${{ inputs.actions-ref != '' }} uses: actions/checkout@v4 with: ref: ${{ inputs.actions-ref }} path: .cicd repository: Lightning-AI/utilities - name: Print 🖨️ dependencies + if: ${{ inputs.actions-ref != '' }} uses: ./.cicd/.github/actions/pip-list with: unfold: true diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 174204de..d97a241f 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -33,7 +33,6 @@ jobs: python-version: ${{ matrix.python-version }} - name: Set oldest dependencies - # todo: this is strange to use itself :/ if: matrix.requires == 'oldest' timeout-minutes: 20 run: | diff --git a/.github/workflows/ci-use-checks.yaml b/.github/workflows/ci-use-checks.yaml index 2d707699..3792ac4f 100644 --- a/.github/workflows/ci-use-checks.yaml +++ b/.github/workflows/ci-use-checks.yaml @@ -79,6 +79,7 @@ jobs: check-docs: uses: ./.github/workflows/check-docs.yml with: + actions-ref: ${{ github.sha }} # use local version requirements-file: "requirements/_docs.txt" install-tex: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 399c6597..c80aca83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - CLI: update parsing inputs ([#333](https://github.com/Lightning-AI/utilities/pull/333)) -- CI: bump upload/download artifact `v4` ([#344](https://github.com/Lightning-AI/utilities/pull/344)) +- CI: bump upload/download artifact `v4` ([#344](https://github.com/Lightning-AI/utilities/pull/344), [#345](https://github.com/Lightning-AI/utilities/pull/345)) + + +- CI: make `actions-ref` optional if used only for listing packages ([#345](https://github.com/Lightning-AI/utilities/pull/345)) - Bump minimal Python version to be 3.9 ([#331](https://github.com/Lightning-AI/utilities/pull/331))