Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx committed Nov 17, 2024
1 parent 5981d35 commit 7cfce39
Showing 1 changed file with 15 additions and 32 deletions.
47 changes: 15 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
changes: # See https://github.com/dorny/paths-filter#examples
runs-on: ubuntu-latest
outputs:
# common: ${{ steps.filter.outputs.common == 'true' || env.RUN_ALL_TESTS == 'true' }}
# kernel: ${{ steps.filter.outputs.kernel == 'true' || env.RUN_ALL_TESTS == 'true' }}
# # stlite-lib: ${{ steps.filter.outputs.stlite-lib == 'true' || env.RUN_ALL_TESTS == 'true' }}
# stlite-lib: true # This step does not detect changes in the `streamlit` submodule that is needed to trigger the test-stlite-lib job (https://github.com/dorny/paths-filter/issues/143), so skip checking and make it always return true as a workaround.
# mountable: ${{ steps.filter.outputs.mountable == 'true' || env.RUN_ALL_TESTS == 'true' }}
# sharing-editor: ${{ steps.filter.outputs.sharing-editor == 'true' || env.RUN_ALL_TESTS == 'true' }}
# sharing-common: ${{ steps.filter.outputs.sharing-common == 'true' || env.RUN_ALL_TESTS == 'true' }}
common: ${{ steps.filter.outputs.common == 'true' || env.RUN_ALL_TESTS == 'true' }}
kernel: ${{ steps.filter.outputs.kernel == 'true' || env.RUN_ALL_TESTS == 'true' }}
# stlite-lib: ${{ steps.filter.outputs.stlite-lib == 'true' || env.RUN_ALL_TESTS == 'true' }}
stlite-lib: true # This step does not detect changes in the `streamlit` submodule that is needed to trigger the test-stlite-lib job (https://github.com/dorny/paths-filter/issues/143), so skip checking and make it always return true as a workaround.
mountable: ${{ steps.filter.outputs.mountable == 'true' || env.RUN_ALL_TESTS == 'true' }}
sharing-editor: ${{ steps.filter.outputs.sharing-editor == 'true' || env.RUN_ALL_TESTS == 'true' }}
sharing-common: ${{ steps.filter.outputs.sharing-common == 'true' || env.RUN_ALL_TESTS == 'true' }}
desktop: ${{ steps.filter.outputs.desktop == 'true' || env.RUN_ALL_TESTS == 'true' }}
# vscode-extension: ${{ steps.filter.outputs.vscode-extension == 'true' || env.RUN_ALL_TESTS == 'true' }}
vscode-extension: ${{ steps.filter.outputs.vscode-extension == 'true' || env.RUN_ALL_TESTS == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
Expand Down Expand Up @@ -266,27 +266,10 @@ jobs:
node-version-file: ${{ env.node-version-file }}
cache: 'yarn'

# DEBUG: On PowerShell, Show the current directory and the contents of the directory. Also, show the contents of streamlit/
- if: matrix.os == 'windows-latest'
run: |
Get-Location
Get-ChildItem
Get-ChildItem streamlit/frontend
working-directory: .
# Delete the patches directory on Windows because `patch-package` fails on Windows: https://github.com/ds300/patch-package/issues/286
# This is a workaround but acceptable as it's only for this job.
- run: rm streamlit\frontend\patches -r -force
if: matrix.os == 'windows-latest'
working-directory: .
# DEBUG: On PowerShell, Show the current directory and the contents of the directory. Also, show the contents of streamlit/
- if: matrix.os == 'windows-latest'
run: |
Get-Location
Get-ChildItem
Get-ChildItem streamlit/frontend
working-directory: .

- run: yarn config set network-timeout 600000 # `yarn install` often takes so long time on in the Windows env.
# `yarn install` often takes so long time on in the Windows env.
- run: yarn config set network-timeout 600000
# Skip the `postinstall` script that runs `patch-package` because it fails on Windows: https://github.com/ds300/patch-package/issues/286
# This is a workaround but acceptable as it's only for this testing job.
- run: yarn install --frozen-lockfile --ignore-scripts
- run: make common
working-directory: .
Expand All @@ -299,7 +282,7 @@ jobs:
- run: yarn test

build-mountable:
if: ${{ success() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
if: ${{ ! failure() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
needs: [test-kernel, test-stlite-lib, test-mountable]

runs-on: ubuntu-latest
Expand Down Expand Up @@ -422,7 +405,7 @@ jobs:
generate_release_notes: true

build-sharing:
if: ${{ success() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
if: ${{ ! failure() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
needs: [test-kernel, test-stlite-lib, test-sharing-common]

runs-on: ubuntu-latest
Expand Down Expand Up @@ -631,7 +614,7 @@ jobs:
input-path: ${{ steps.get-package-file-path.outputs.PACKAGE_FILE_PATH }}

e2e-desktop:
if: ${{ success() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
if: ${{ ! failure() }} # This job should run even if the depending jobs are skipped, but not when those jobs failed: https://qiita.com/abetomo/items/d9ede7dbeeb24f723fc5#%E8%A8%AD%E5%AE%9A%E4%BE%8B4
needs: [build-desktop]

runs-on: ubuntu-latest
Expand Down

0 comments on commit 7cfce39

Please sign in to comment.