Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
almirsarajcic committed Sep 18, 2024
1 parent 0c123df commit 5cb007b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 149 deletions.
2 changes: 1 addition & 1 deletion .github/github_workflows.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
73 changes: 0 additions & 73 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
73 changes: 0 additions & 73 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions priv/static/Linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions test/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cb007b

Please sign in to comment.