Skip to content

Commit 18f2ff0

Browse files
authored
created test workflow to test dotfiles
2 parents 2a45e5a + 9e8fa51 commit 18f2ff0

File tree

8 files changed

+42
-5
lines changed

8 files changed

+42
-5
lines changed

.bash_profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# shellcheck disable=SC2148
2+
# shellcheck disable=SC1091
23

34
# Fix to prevent LMStudio polluting my dotfiles at every start
45
# https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/656#issuecomment-2938234807

.bashrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# shellcheck disable=SC2148
2+
# shellcheck disable=SC1091
23

34
# Fix to prevent LMStudio polluting my dotfiles at every start
45
# https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/656#issuecomment-2938234807

.functions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# shellcheck disable=SC2148
2+
# shellcheck disable=SC1091
23

34
# go to dotfiles location
45
dot() {

.github/workflows/test.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
# Enable manual triggering
9+
workflow_dispatch:
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Checkout the repository code
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
# Install dotfiles
21+
- name: Install dotfiles
22+
shell: bash -ieo pipefail {0}
23+
env:
24+
DOTFILES_REPO_DIR: ${{ github.workspace }}
25+
run: |
26+
./install.sh --deps --force
27+
ll ~

.profile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# shellcheck disable=SC2148
2+
# shellcheck disable=SC1091
23

34
# Fix to prevent LMStudio polluting my dotfiles at every start
45
# https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/656#issuecomment-2938234807

.stow-local-ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ README.md
55
backup
66
.git
77
.gitignore
8+
.github

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# dotfiles
22

3+
![Tests](https://github.com/pasquale95/dotfiles/actions/workflows/test.yaml/badge.svg)
4+
35
Collection of dotfiles that can be used to quickly setup a new macOS.
46

57
## Table of Contents <!-- omit in toc -->

install.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ echo "🕒 Installing dotfiles..."
5050
if [[ INSTALL_DEPS -eq 1 ]]; then
5151
# install all the additional dependencies using brew
5252
"${DOTFILES_REPO_DIR}/brew.sh"
53-
fi
5453

55-
# install missing dependency
56-
if (! command -v stow >/dev/null 2>&1); then
57-
echo "stow is not installed. Installing it..."
58-
brew install stow
54+
# source brew env
55+
if [ -f /opt/homebrew/bin/brew ]; then
56+
# typical path where resides on macOS
57+
eval "$(/opt/homebrew/bin/brew shellenv)"
58+
elif [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then
59+
# typical path where resides on linux
60+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
61+
fi
5962
fi
6063

6164
if [[ INSTALL_FORCE -eq 1 ]]; then

0 commit comments

Comments
 (0)