Skip to content

Commit

Permalink
ci: upload lock file diffs to artifacts to ease debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
iisakkirotko committed Aug 27, 2024
1 parent 48c1c77 commit f1d70c3
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ 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 > diff-code-quality-python${{ matrix.python-version }}.txt || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT"
- name: Install
if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true'
Expand All @@ -152,6 +152,13 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files

- name: Upload Test artifacts
if: always()
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
Expand Down Expand Up @@ -286,7 +293,7 @@ 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 > diff-integration-os${{ matrix.os }}-python${{ matrix.python-version }}-ipywidgets${{ matrix.ipywidgets_major }}.txt || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT"
- name: Install
if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true'
Expand Down Expand Up @@ -318,7 +325,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'
Expand Down Expand Up @@ -388,7 +397,7 @@ 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 > diff-integration-vue3-os${{ matrix.os }}-ipywidgets${{ matrix.ipywidgets_major }}.txt || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT"
- name: Install
if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true'
Expand Down Expand Up @@ -420,7 +429,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'
Expand Down Expand Up @@ -484,7 +495,7 @@ 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 > diff-unit-os${{ matrix.os }}-python${{ matrix.python }}-ipywidgets${{ matrix.ipywidgets }}.txt || echo "HAS_DIFF=true" >> "$GITHUB_OUTPUT"
- name: Install
if: github.event_name != 'schedule' && steps.prepare.outputs.LOCKS_EXIST == 'true'
Expand All @@ -507,6 +518,13 @@ jobs:
mv solara _solara
pytest tests/unit --doctest-modules --timeout=60
- name: upload test artifacts
if: always()
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
Expand Down

0 comments on commit f1d70c3

Please sign in to comment.