-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try Github actions for bootstrap test
- Loading branch information
1 parent
60053ec
commit c254a80
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM archlinux:base | ||
|
||
RUN useradd --create-home --shell /bin/bash primeapple && adduser primeapple sudo | ||
USER primeapple | ||
|
||
RUN pacman -Syu --noconfirm \ | ||
&& pacman -S --noconfirm fish yadm | ||
|
||
WORKDIR /home/primeapple | ||
COPY yadm-test.sh yadm-test.sh | ||
RUN chmod +x yadm-test.sh | ||
|
||
CMD ./yadm-test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Yadm Test | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build Docker image | ||
run: docker build -f .github/Dockerfile -t arch-yadm .github/ | ||
|
||
- name: Run yadm-test script | ||
run: docker run --rm arch-yadm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
echo "TEST: Cloning the dotfiles" | ||
yadm clone --no-bootstrap https://github.com/primeapple/dotfiles | ||
|
||
pwd | ||
echo ~ | ||
|
||
echo "TEST: Checking if required directories and files exist" | ||
directories=("~/.config/nvim" "~/.config/fish") | ||
files=("~/.profile" "~/.vimrc") | ||
|
||
for dir in "${directories[@]}"; do | ||
if [ ! -d "$dir" ]; then | ||
echo "Error: Directory $dir does not exist." | ||
exit 1 | ||
fi | ||
done | ||
|
||
for file in "${files[@]}"; do | ||
if [ ! -f "$file" ]; then | ||
echo "Error: File $file does not exist." | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "TEST: Executing bootstrap" | ||
yadm bootstrap |