diff --git a/.bash_profile b/.bash_profile index 5518979..dd46be7 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,4 +1,5 @@ # shellcheck disable=SC2148 +# shellcheck disable=SC1091 # Fix to prevent LMStudio polluting my dotfiles at every start # https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/656#issuecomment-2938234807 diff --git a/.bashrc b/.bashrc index 63457c1..e04c39a 100644 --- a/.bashrc +++ b/.bashrc @@ -1,4 +1,5 @@ # shellcheck disable=SC2148 +# shellcheck disable=SC1091 # Fix to prevent LMStudio polluting my dotfiles at every start # https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/656#issuecomment-2938234807 diff --git a/.functions b/.functions index 1212710..624c114 100644 --- a/.functions +++ b/.functions @@ -1,4 +1,5 @@ # shellcheck disable=SC2148 +# shellcheck disable=SC1091 # go to dotfiles location dot() { diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..05bb62a --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,27 @@ +name: Tests + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + # Enable manual triggering + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + # Checkout the repository code + - name: Checkout repository + uses: actions/checkout@v4 + + # Install dotfiles + - name: Install dotfiles + shell: bash -ieo pipefail {0} + env: + DOTFILES_REPO_DIR: ${{ github.workspace }} + run: | + ./install.sh --deps --force + ll ~ diff --git a/.profile b/.profile index 7d7c259..bbadb5d 100644 --- a/.profile +++ b/.profile @@ -1,4 +1,5 @@ # shellcheck disable=SC2148 +# shellcheck disable=SC1091 # Fix to prevent LMStudio polluting my dotfiles at every start # https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/656#issuecomment-2938234807 diff --git a/.stow-local-ignore b/.stow-local-ignore index 1b2b007..15d9fee 100644 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -5,3 +5,4 @@ README.md backup .git .gitignore +.github diff --git a/README.md b/README.md index f5b7630..95ee1c6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # dotfiles +![Tests](https://github.com/pasquale95/dotfiles/actions/workflows/test.yaml/badge.svg) + Collection of dotfiles that can be used to quickly setup a new macOS. ## Table of Contents diff --git a/install.sh b/install.sh index aa29a7d..332bb0c 100755 --- a/install.sh +++ b/install.sh @@ -50,12 +50,15 @@ echo "🕒 Installing dotfiles..." if [[ INSTALL_DEPS -eq 1 ]]; then # install all the additional dependencies using brew "${DOTFILES_REPO_DIR}/brew.sh" -fi -# install missing dependency -if (! command -v stow >/dev/null 2>&1); then - echo "stow is not installed. Installing it..." - brew install stow + # source brew env + if [ -f /opt/homebrew/bin/brew ]; then + # typical path where resides on macOS + eval "$(/opt/homebrew/bin/brew shellenv)" + elif [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then + # typical path where resides on linux + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + fi fi if [[ INSTALL_FORCE -eq 1 ]]; then