diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 833d85d87..a983f30dd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -140,7 +140,9 @@ jobs: mkdir -p .ci-package-locks/code-quality pip install pre-commit pip freeze --exclude solara --exclude solara-enterprise > ${{ env.LOCK_FILE_LOCATION }} - git diff --quiet || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" + { git diff --exit-code; echo $? > diff_exit_code.txt; } | tee diff-code-quality-python${{ matrix.python-version }}.txt; + exit_code=$( tail -n 1 diff_exit_code.txt ) + [ "$exit_code" -eq 0 ] || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" - name: Install if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true' @@ -152,6 +154,13 @@ jobs: - name: Run pre-commit run: pre-commit run --all-files + - name: Upload Test artifacts + if: github.event_name == 'schedule' || steps.prepare.outputs.LOCKS_EXIST == 'false' + uses: actions/upload-artifact@v4 + with: + name: test-results-code-quality-python${{ matrix.python-version }} + path: diff-code-quality-python${{ matrix.python-version }}.txt + - name: Upload CI package locks if: steps.install_no_lock.outputs.HAS_DIFF == 'true' || steps.prepare.outputs.LOCKS_EXIST == 'false' uses: actions/upload-artifact@v4 @@ -286,7 +295,9 @@ jobs: pip install `echo packages/solara-enterprise/dist/*.whl`[ssg,auth] pip install "jupyterlab<4" "pydantic<2" "playwright==1.41.2" "ipywidgets~=${{ matrix.ipywidgets }}" pip freeze --exclude solara --exclude solara-ui --exclude solara-server --exclude pytest-ipywidgets --exclude solara-enterprise > ${{ env.LOCK_FILE_LOCATION }} - git diff --quiet || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" + { git diff --exit-code; echo $? > diff_exit_code.txt; } | tee diff-integration-os${{ matrix.os }}-python${{ matrix.python-version }}-ipywidgets${{ matrix.ipywidgets_major }}.txt; + exit_code=$( tail -n 1 diff_exit_code.txt ) + [ "$exit_code" -eq 0 ] || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" - name: Install if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true' @@ -318,7 +329,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: test-results-integration-os${{ matrix.os }}-python${{ matrix.python-version }}-ipywidgets${{ matrix.ipywidgets_major }} - path: test-results + path: | + test-results + diff-integration-os${{ matrix.os }}-python${{ matrix.python-version }}-ipywidgets${{ matrix.ipywidgets_major }}.txt - name: Upload CI package locks if: steps.install_no_lock.outputs.HAS_DIFF == 'true' || steps.prepare.outputs.LOCKS_EXIST == 'false' @@ -388,7 +401,9 @@ jobs: pip install jupyter_core jupyter-packaging pip install --pre ipyvue ipyvuetify pip freeze --exclude solara --exclude solara-ui --exclude solara-server --exclude pytest-ipywidgets --exclude solara-enterprise > ${{ env.LOCK_FILE_LOCATION }} - git diff --quiet || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" + { git diff --exit-code; echo $? > diff_exit_code.txt; } | tee diff-integration-vue3-os${{ matrix.os }}-ipywidgets${{ matrix.ipywidgets_major }}.txt; + exit_code=$( tail -n 1 diff_exit_code.txt ) + [ "$exit_code" -eq 0 ] || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" - name: Install if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true' @@ -420,7 +435,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: test-results-integration-vue3-os${{ matrix.os }}-ipywidgets${{ matrix.ipywidgets_major }} - path: test-results + path: | + test-results + diff-integration-vue3-os${{ matrix.os }}-ipywidgets${{ matrix.ipywidgets_major }}.txt - name: Upload CI package locks if: steps.install_no_lock.outputs.HAS_DIFF == 'true' || steps.prepare.outputs.LOCKS_EXIST == 'false' @@ -484,7 +501,9 @@ jobs: pip install `echo packages/solara-enterprise/dist/*.whl`[ssg,auth] pip install "jupyterlab<4" diskcache redis "ipywidgets~=${{ matrix.ipywidgets }}" pip freeze --exclude solara --exclude solara-ui --exclude solara-server --exclude pytest-ipywidgets --exclude solara-enterprise > ${{ env.LOCK_FILE_LOCATION }} - git diff --quiet || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" + { git diff --exit-code; echo $? > diff_exit_code.txt; } | tee diff-unit-os${{ matrix.os }}-python${{ matrix.python }}-ipywidgets${{ matrix.ipywidgets }}.txt; + exit_code=$( tail -n 1 diff_exit_code.txt ) + [ "$exit_code" -eq 0 ] || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT" - name: Install if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true' @@ -507,6 +526,13 @@ jobs: mv solara _solara pytest tests/unit --doctest-modules --timeout=60 + - name: upload test artifacts + if: github.event_name == 'schedule' || steps.prepare.outputs.LOCKS_EXIST == 'false' + uses: actions/upload-artifact@v4 + with: + name: test-results-unit-os${{ matrix.os }}-python${{ matrix.python }}-ipywidgets${{ matrix.ipywidgets }} + path: diff-unit-os${{ matrix.os }}-python${{ matrix.python }}-ipywidgets${{ matrix.ipywidgets }}.txt + - name: Upload CI package locks if: steps.install_no_lock.outputs.HAS_DIFF == 'true' || steps.prepare.outputs.LOCKS_EXIST == 'false' uses: actions/upload-artifact@v4