From a9ca9e518c47a9fb614eddda44bd39a5ba12cb74 Mon Sep 17 00:00:00 2001 From: Nils Reichardt Date: Wed, 12 Jun 2024 11:37:05 +0200 Subject: [PATCH] Disable concurrency for `sz` command in our CI/CD pipeline (#1659) Not sure if there is another easy way to fix #1658 --------- Co-authored-by: Jonas Sander <29028262+Jonas-Sander@users.noreply.github.com> --- .github/workflows/cli_ci.yml | 17 +++++++++++------ .github/workflows/safe_app_ci.yml | 17 +++++++++++------ .github/workflows/safe_console_ci.yml | 9 ++++++--- .github/workflows/safe_website_ci.yml | 7 ++++++- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cli_ci.yml b/.github/workflows/cli_ci.yml index d794c42d5..04fb7bd25 100644 --- a/.github/workflows/cli_ci.yml +++ b/.github/workflows/cli_ci.yml @@ -99,9 +99,11 @@ jobs: - run: echo $(realpath ./bin) >> $GITHUB_PATH - name: Run code analysis via "sz analyze" (formatting, issues, spacing ...) + # We don't run the analysis in parallel to prevent + # https://github.com/SharezoneApp/sharezone-app/issues/1658. run: | sz analyze \ - --max-concurrent-packages 3 \ + --max-concurrent-packages 1 \ --package-timeout-minutes 15 \ --only sz_repo_cli @@ -139,8 +141,11 @@ jobs: # Because of this, we need to exclude the golden tests because they # require a macOS runner. - name: Run tests via "sz test" - run: sz test \ - -c 4 \ - --package-timeout-minutes 15 \ - --exclude-goldens \ - --only sz_repo_cli + # We don't run the analysis in parallel to prevent + # https://github.com/SharezoneApp/sharezone-app/issues/1658. + run: | + sz test \ + -c 1 \ + --package-timeout-minutes 15 \ + --exclude-goldens \ + --only sz_repo_cli diff --git a/.github/workflows/safe_app_ci.yml b/.github/workflows/safe_app_ci.yml index e887274d5..81edeb932 100644 --- a/.github/workflows/safe_app_ci.yml +++ b/.github/workflows/safe_app_ci.yml @@ -116,7 +116,12 @@ jobs: - run: echo $(realpath ./bin) >> $GITHUB_PATH - name: Run code analysis via "sz analyze" (formatting, issues, spacing ...) - run: sz analyze --max-concurrent-packages 3 --package-timeout-minutes 15 + # We don't run the analysis in parallel to prevent + # https://github.com/SharezoneApp/sharezone-app/issues/1658. + run: | + sz analyze \ + --max-concurrent-packages 1 \ + --package-timeout-minutes 15 # We split the tests into two jobs, because we want to run the golden tests on # a macOS runner, because the golden tests were generated on macOS. To reduce @@ -145,9 +150,11 @@ jobs: - run: echo $(pwd)/bin >> $GITHUB_PATH - name: Run tests via "sz test" + # We don't run the analysis in parallel to prevent + # https://github.com/SharezoneApp/sharezone-app/issues/1658. run: | sz test \ - -c 4 \ + -c 1 \ --package-timeout-minutes 15 \ --exclude-goldens @@ -178,11 +185,9 @@ jobs: flutter pub global activate --source path "$CI_CD_DART_SCRIPTS_PACKAGE_PATH" echo $(pwd)/bin >> $GITHUB_PATH - # Running with -c 1 as using -c 4 would lead to to this dependency error: - # https://github.com/SharezoneApp/sharezone-app/pull/1322#issuecomment-1981410505 - # We don't know why this happens. - # In the future please try to use a higher concurrency value again. - name: Run tests via "sz test" + # We don't run the analysis in parallel to prevent + # https://github.com/SharezoneApp/sharezone-app/issues/1658. run: | sz test \ -c 1 \ diff --git a/.github/workflows/safe_console_ci.yml b/.github/workflows/safe_console_ci.yml index f7c44d01b..435056921 100644 --- a/.github/workflows/safe_console_ci.yml +++ b/.github/workflows/safe_console_ci.yml @@ -114,6 +114,9 @@ jobs: echo $(pwd)/bin >> $GITHUB_PATH - name: Run code analysis via "sz analyze" (formatting, issues, spacing ...) - run: sz analyze \ - --max-concurrent-packages 3 \ - --package-timeout-minutes 15 + # We don't run the analysis in parallel to prevent + # https://github.com/SharezoneApp/sharezone-app/issues/1658. + run: | + sz analyze \ + --max-concurrent-packages 1 \ + --package-timeout-minutes 15 diff --git a/.github/workflows/safe_website_ci.yml b/.github/workflows/safe_website_ci.yml index 35fde63be..08f9f24d6 100644 --- a/.github/workflows/safe_website_ci.yml +++ b/.github/workflows/safe_website_ci.yml @@ -115,4 +115,9 @@ jobs: - run: echo $(realpath ./bin) >> $GITHUB_PATH - name: Run code analysis via "sz analyze" (formatting, issues, spacing ...) - run: sz analyze --max-concurrent-packages 3 --package-timeout-minutes 15 + # We don't run the analysis in parallel to prevent + # https://github.com/SharezoneApp/sharezone-app/issues/1658. + run: | + sz analyze \ + --max-concurrent-packages 1 \ + --package-timeout-minutes 15