From 21bd37841e4ef5c776fd2ddf31307d101262ee7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Almir=20Saraj=C4=8Di=C4=87?= Date: Wed, 18 Sep 2024 14:05:02 +0200 Subject: [PATCH] Debug --- .github/github_workflows.ex | 20 +-- .github/workflows/main.yml | 266 ------------------------------------ .github/workflows/pr.yml | 266 ------------------------------------ priv/static/Linux.sh | 5 + priv/static/macOS.sh | 5 + 5 files changed, 20 insertions(+), 542 deletions(-) diff --git a/.github/github_workflows.ex b/.github/github_workflows.ex index 90d915e5..cbee76ce 100644 --- a/.github/github_workflows.ex +++ b/.github/github_workflows.ex @@ -79,16 +79,16 @@ defmodule GithubWorkflows do defp ci_jobs do [ - compile: compile_job(), - credo: credo_job(), - deps_audit: deps_audit_job(), - dialyzer: dialyzer_job(), - format: format_job(), - hex_audit: hex_audit_job(), - prettier: prettier_job(), - sobelow: sobelow_job(), - test: test_job(), - unused_deps: unused_deps_job() + # compile: compile_job(), + # credo: credo_job(), + # deps_audit: deps_audit_job(), + # dialyzer: dialyzer_job(), + # format: format_job(), + # hex_audit: hex_audit_job(), + # prettier: prettier_job(), + # sobelow: sobelow_job(), + # test: test_job(), + # unused_deps: unused_deps_job() ] ++ test_scripts_jobs() end diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 094c80f0..415fd606 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,262 +6,6 @@ on: - main jobs: - compile: - name: Install deps and compile - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Install Elixir dependencies - env: - MIX_ENV: test - run: mix deps.get - - name: Compile - env: - MIX_ENV: test - run: mix compile - credo: - needs: compile - name: Credo - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check code style - env: - MIX_ENV: test - run: mix credo --strict - deps_audit: - needs: compile - name: Deps audit - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for vulnerable Mix dependencies - env: - MIX_ENV: test - run: mix deps.audit - dialyzer: - needs: compile - name: Dialyzer - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Restore PLT cache - uses: actions/cache@v3 - with: - path: priv/plts - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-plt-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-plt- - - name: Create PLTs - env: - MIX_ENV: test - run: mix dialyzer --plt - - name: Run dialyzer - env: - MIX_ENV: test - run: mix dialyzer - format: - needs: compile - name: Format - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check Elixir formatting - env: - MIX_ENV: test - run: mix format --check-formatted - hex_audit: - needs: compile - name: Hex audit - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for retired Hex packages - env: - MIX_ENV: test - run: mix hex.audit - prettier: - name: Check formatting using Prettier - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Restore npm cache - uses: actions/cache@v3 - id: npm-cache - with: - path: node_modules - key: ${{ runner.os }}-prettier - - name: Install Prettier - if: steps.npm-cache.outputs.cache-hit != 'true' - run: npm i -D prettier prettier-plugin-toml - - name: Run Prettier - run: npx prettier -c . - sobelow: - needs: compile - name: Security check - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for security issues using sobelow - env: - MIX_ENV: test - run: mix sobelow --config .sobelow-conf - test: - needs: compile - name: Test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Run tests - env: - MIX_ENV: test - run: mix test --cover --warnings-as-errors - unused_deps: - needs: compile - name: Check unused deps - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for unused Mix dependencies - env: - MIX_ENV: test - run: mix deps.unlock --check-unused test_linux_bash: name: Test Linux script with bash shell runs-on: ubuntu-latest @@ -407,16 +151,6 @@ jobs: deploy_production_app: name: Deploy production app needs: - - compile - - credo - - deps_audit - - dialyzer - - format - - hex_audit - - prettier - - sobelow - - test - - unused_deps - test_linux_bash - test_macos_bash - test_linux_zsh diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 5e8239a1..18ae128f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,262 +6,6 @@ on: - mise jobs: - compile: - name: Install deps and compile - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Install Elixir dependencies - env: - MIX_ENV: test - run: mix deps.get - - name: Compile - env: - MIX_ENV: test - run: mix compile - credo: - needs: compile - name: Credo - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check code style - env: - MIX_ENV: test - run: mix credo --strict - deps_audit: - needs: compile - name: Deps audit - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for vulnerable Mix dependencies - env: - MIX_ENV: test - run: mix deps.audit - dialyzer: - needs: compile - name: Dialyzer - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Restore PLT cache - uses: actions/cache@v3 - with: - path: priv/plts - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-plt-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-plt- - - name: Create PLTs - env: - MIX_ENV: test - run: mix dialyzer --plt - - name: Run dialyzer - env: - MIX_ENV: test - run: mix dialyzer - format: - needs: compile - name: Format - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check Elixir formatting - env: - MIX_ENV: test - run: mix format --check-formatted - hex_audit: - needs: compile - name: Hex audit - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for retired Hex packages - env: - MIX_ENV: test - run: mix hex.audit - prettier: - name: Check formatting using Prettier - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Restore npm cache - uses: actions/cache@v3 - id: npm-cache - with: - path: node_modules - key: ${{ runner.os }}-prettier - - name: Install Prettier - if: steps.npm-cache.outputs.cache-hit != 'true' - run: npm i -D prettier prettier-plugin-toml - - name: Run Prettier - run: npx prettier -c . - sobelow: - needs: compile - name: Security check - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for security issues using sobelow - env: - MIX_ENV: test - run: mix sobelow --config .sobelow-conf - test: - needs: compile - name: Test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Run tests - env: - MIX_ENV: test - run: mix test --cover --warnings-as-errors - unused_deps: - needs: compile - name: Check unused deps - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - id: setup-beam - name: Set up Elixir - uses: erlef/setup-beam@v1 - with: - version-file: .tool-versions - version-type: strict - - uses: actions/cache@v3 - with: - path: | - _build - deps - key: ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-${{ steps.setup-beam.outputs.elixir-version }}-${{ steps.setup-beam.outputs.otp-version }}-mix- - - name: Check for unused Mix dependencies - env: - MIX_ENV: test - run: mix deps.unlock --check-unused test_linux_bash: name: Test Linux script with bash shell runs-on: ubuntu-latest @@ -407,16 +151,6 @@ jobs: deploy_preview_app: name: Deploy preview app needs: - - compile - - credo - - deps_audit - - dialyzer - - format - - hex_audit - - prettier - - sobelow - - test - - unused_deps - test_linux_bash - test_macos_bash - test_linux_zsh diff --git a/priv/static/Linux.sh b/priv/static/Linux.sh index f10bd1e2..a1fce50b 100755 --- a/priv/static/Linux.sh +++ b/priv/static/Linux.sh @@ -79,6 +79,11 @@ function install() { echo 'eval "$(~/.local/bin/mise activate $current_shell)"' >>$config_file eval "$(~/.local/bin/mise activate $current_shell)" eval "$(~/.local/bin/mise hook-env)" + + echo "--- Debug $config_file ---" + cat $config_file + echo "--- End debug $config_file ---" + echo "PATH: $PATH" ;; "Phoenix") mix local.hex --force diff --git a/priv/static/macOS.sh b/priv/static/macOS.sh index 6aedd68c..76eda38b 100755 --- a/priv/static/macOS.sh +++ b/priv/static/macOS.sh @@ -87,6 +87,11 @@ function install() { echo 'eval "$(mise activate '$current_shell')"' >>$config_file eval "$(mise activate $current_shell)" eval "$(mise hook-env)" + + echo "--- Debug $config_file ---" + cat $config_file + echo "--- End debug $config_file ---" + echo "PATH: $PATH" ;; "Phoenix") mix local.hex --force