From 5cb007b32bcae12b42c47f18cd0f809b6f3d4551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Almir=20Saraj=C4=8Di=C4=87?= Date: Wed, 18 Sep 2024 17:06:21 +0200 Subject: [PATCH] Debug --- .github/github_workflows.ex | 2 +- .github/workflows/main.yml | 73 ------------------------------------- .github/workflows/pr.yml | 73 ------------------------------------- priv/static/Linux.sh | 3 ++ test/scripts/Makefile | 5 ++- 5 files changed, 7 insertions(+), 149 deletions(-) diff --git a/.github/github_workflows.ex b/.github/github_workflows.ex index 50b33330..a64a1e60 100644 --- a/.github/github_workflows.ex +++ b/.github/github_workflows.ex @@ -380,7 +380,7 @@ defmodule GithubWorkflows do jobs ++ [ {:"test_linux_#{shell}", test_linux_script_job(shell)}, - {:"test_macos_#{shell}", test_macos_script_job(shell)} + # {:"test_macos_#{shell}", test_macos_script_job(shell)} ] end) end diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7fe8eca8..b2427c71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,40 +40,6 @@ jobs: max_attempts: 7 retry_wait_seconds: 5 timeout_seconds: 1 - test_macos_bash: - name: Test macOS script with bash shell - runs-on: macos-latest - env: - SHELL: /bin/bash - TZ: America/New_York - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Restore script result cache - uses: actions/cache@v3 - id: result_cache - with: - key: ${{ runner.os }}-bash-script-${{ hashFiles('test/scripts/script.exp') }}-${{ hashFiles('priv/static/macOS.sh') }} - path: priv/static/macOS.sh - - name: Install expect tool - if: steps.result_cache.outputs.cache-hit != 'true' - run: brew install expect - - name: Test the script - if: steps.result_cache.outputs.cache-hit != 'true' - run: cd test/scripts && expect script.exp macOS.sh - shell: /bin/bash -l {0} - - name: Generate an app and start the server - if: steps.result_cache.outputs.cache-hit != 'true' - run: /bin/bash -c 'source ~/.bash_profile && make -f test/scripts/Makefile serve' - shell: /bin/bash -l {0} - - name: Check HTTP status code - if: steps.result_cache.outputs.cache-hit != 'true' - uses: nick-fields/retry@v2 - with: - command: INPUT_SITES='["http://localhost:4000"]' INPUT_EXPECTED='[200]' ./test/scripts/check_status_code.sh - max_attempts: 7 - retry_wait_seconds: 5 - timeout_seconds: 1 test_linux_zsh: name: Test Linux script with zsh shell runs-on: ubuntu-latest @@ -111,50 +77,11 @@ jobs: max_attempts: 7 retry_wait_seconds: 5 timeout_seconds: 1 - test_macos_zsh: - name: Test macOS script with zsh shell - runs-on: macos-latest - env: - SHELL: /bin/zsh - TZ: America/New_York - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Restore script result cache - uses: actions/cache@v3 - id: result_cache - with: - key: ${{ runner.os }}-zsh-script-${{ hashFiles('test/scripts/script.exp') }}-${{ hashFiles('priv/static/macOS.sh') }} - path: priv/static/macOS.sh - - name: Install shell - if: steps.result_cache.outputs.cache-hit != 'true' - run: brew install zsh - - name: Install expect tool - if: steps.result_cache.outputs.cache-hit != 'true' - run: brew install expect - - name: Test the script - if: steps.result_cache.outputs.cache-hit != 'true' - run: cd test/scripts && expect script.exp macOS.sh - shell: /bin/zsh -l {0} - - name: Generate an app and start the server - if: steps.result_cache.outputs.cache-hit != 'true' - run: /bin/zsh -c 'source ~/.zshrc && make -f test/scripts/Makefile serve' - shell: /bin/zsh -l {0} - - name: Check HTTP status code - if: steps.result_cache.outputs.cache-hit != 'true' - uses: nick-fields/retry@v2 - with: - command: INPUT_SITES='["http://localhost:4000"]' INPUT_EXPECTED='[200]' ./test/scripts/check_status_code.sh - max_attempts: 7 - retry_wait_seconds: 5 - timeout_seconds: 1 deploy_production_app: name: Deploy production app needs: - test_linux_bash - - test_macos_bash - test_linux_zsh - - test_macos_zsh runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6722df16..4c3a37ac 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,40 +40,6 @@ jobs: max_attempts: 7 retry_wait_seconds: 5 timeout_seconds: 1 - test_macos_bash: - name: Test macOS script with bash shell - runs-on: macos-latest - env: - SHELL: /bin/bash - TZ: America/New_York - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Restore script result cache - uses: actions/cache@v3 - id: result_cache - with: - key: ${{ runner.os }}-bash-script-${{ hashFiles('test/scripts/script.exp') }}-${{ hashFiles('priv/static/macOS.sh') }} - path: priv/static/macOS.sh - - name: Install expect tool - if: steps.result_cache.outputs.cache-hit != 'true' - run: brew install expect - - name: Test the script - if: steps.result_cache.outputs.cache-hit != 'true' - run: cd test/scripts && expect script.exp macOS.sh - shell: /bin/bash -l {0} - - name: Generate an app and start the server - if: steps.result_cache.outputs.cache-hit != 'true' - run: /bin/bash -c 'source ~/.bash_profile && make -f test/scripts/Makefile serve' - shell: /bin/bash -l {0} - - name: Check HTTP status code - if: steps.result_cache.outputs.cache-hit != 'true' - uses: nick-fields/retry@v2 - with: - command: INPUT_SITES='["http://localhost:4000"]' INPUT_EXPECTED='[200]' ./test/scripts/check_status_code.sh - max_attempts: 7 - retry_wait_seconds: 5 - timeout_seconds: 1 test_linux_zsh: name: Test Linux script with zsh shell runs-on: ubuntu-latest @@ -111,50 +77,11 @@ jobs: max_attempts: 7 retry_wait_seconds: 5 timeout_seconds: 1 - test_macos_zsh: - name: Test macOS script with zsh shell - runs-on: macos-latest - env: - SHELL: /bin/zsh - TZ: America/New_York - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Restore script result cache - uses: actions/cache@v3 - id: result_cache - with: - key: ${{ runner.os }}-zsh-script-${{ hashFiles('test/scripts/script.exp') }}-${{ hashFiles('priv/static/macOS.sh') }} - path: priv/static/macOS.sh - - name: Install shell - if: steps.result_cache.outputs.cache-hit != 'true' - run: brew install zsh - - name: Install expect tool - if: steps.result_cache.outputs.cache-hit != 'true' - run: brew install expect - - name: Test the script - if: steps.result_cache.outputs.cache-hit != 'true' - run: cd test/scripts && expect script.exp macOS.sh - shell: /bin/zsh -l {0} - - name: Generate an app and start the server - if: steps.result_cache.outputs.cache-hit != 'true' - run: /bin/zsh -c 'source ~/.zshrc && make -f test/scripts/Makefile serve' - shell: /bin/zsh -l {0} - - name: Check HTTP status code - if: steps.result_cache.outputs.cache-hit != 'true' - uses: nick-fields/retry@v2 - with: - command: INPUT_SITES='["http://localhost:4000"]' INPUT_EXPECTED='[200]' ./test/scripts/check_status_code.sh - max_attempts: 7 - retry_wait_seconds: 5 - timeout_seconds: 1 deploy_preview_app: name: Deploy preview app needs: - test_linux_bash - - test_macos_bash - test_linux_zsh - - test_macos_zsh runs-on: ubuntu-latest permissions: write-all concurrency: diff --git a/priv/static/Linux.sh b/priv/static/Linux.sh index 124f36ef..baf1c082 100755 --- a/priv/static/Linux.sh +++ b/priv/static/Linux.sh @@ -76,6 +76,9 @@ function install() { case "$1" in "Elixir") mise use -g elixir@$elixir_version + ls ~/.local/share/mise/shims + mise reshim + ls ~/.local/share/mise/shims ;; "Erlang") if [ ! -f ~/.kerlrc ]; then diff --git a/test/scripts/Makefile b/test/scripts/Makefile index e0591554..76c69c66 100644 --- a/test/scripts/Makefile +++ b/test/scripts/Makefile @@ -11,12 +11,13 @@ serve: echo "Debug: $$PATH" - echo "Debug: $$PATH" - mise doctor ls ~/.local/share/mise/shims mise reshim ls ~/.local/share/mise/shims + echo "Debug: $$PATH" + + # initdb -D ~/pgdata -U postgres # pg_ctl start -D ~/pgdata mix phx.new --no-install phx_tools_test