File tree 3 files changed +58
-0
lines changed
3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM archlinux:base
2
+
3
+ RUN useradd --create-home --shell /bin/bash primeapple
4
+ USER primeapple
5
+ RUN pacman -Syu --noconfirm \
6
+ && pacman -S --noconfirm fish yadm
7
+
8
+ WORKDIR /home/primeapple
9
+ COPY yadm-test.sh yadm-test.sh
10
+ RUN chmod +x yadm-test.sh
11
+
12
+ CMD ./yadm-test.sh
Original file line number Diff line number Diff line change
1
+ name : Yadm Test
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ test :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Build Docker image
17
+ run : docker build -f .github/Dockerfile -t arch-yadm .github/
18
+
19
+ - name : Run yadm-test script
20
+ run : docker run --rm arch-yadm
Original file line number Diff line number Diff line change
1
+ echo " TEST: Cloning the dotfiles"
2
+ yadm clone --no-bootstrap https://github.com/primeapple/dotfiles
3
+
4
+ pwd
5
+ echo ~
6
+
7
+ echo " TEST: Checking if required directories and files exist"
8
+ directories=(" ~/.config/nvim" " ~/.config/fish" )
9
+ files=(" ~/.profile" " ~/.vimrc" )
10
+
11
+ for dir in " ${directories[@]} " ; do
12
+ if [ ! -d " $dir " ]; then
13
+ echo " Error: Directory $dir does not exist."
14
+ exit 1
15
+ fi
16
+ done
17
+
18
+ for file in " ${files[@]} " ; do
19
+ if [ ! -f " $file " ]; then
20
+ echo " Error: File $file does not exist."
21
+ exit 1
22
+ fi
23
+ done
24
+
25
+ echo " TEST: Executing bootstrap"
26
+ yadm bootstrap
You can’t perform that action at this time.
0 commit comments