Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,23 @@ jobs:

- name: Only build
run: |
docker buildx build --platform linux/amd64 --output "type=image,push=false" -f tests/Dockerfile-${{ matrix.distro }} .
docker buildx build --platform linux/amd64 --output "type=image,push=false" -f tests/Dockerfile-${{ matrix.distro }} .

test-macos:
# macOS has no equivalent to the Dockerfile-based distro tests above
# (no official macOS container images), so this runs directly on a
# hosted macOS runner instead.
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Full install
run: make

# Verify the install actually landed, not just that `make` exited 0.
- name: Verify install
run: |
test -L ~/.config/nvim/init.lua
test -L ~/.config/fish/conf.d/aliases.fish
fish -c 'functions -q gitissue'
fish -c 'functions -q fisher'
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,21 @@ When you submit a pull request, the following automated checks run:
- Arch Linux
- Fedora
- Ubuntu
- macOS

- **Docker-based Testing**: Each distribution test runs in a containerized environment using Docker Buildx with QEMU for cross-platform compatibility
- **Docker-based Testing**: Each Linux distribution test runs in a containerized environment using Docker Buildx with QEMU for cross-platform compatibility

- **Build Verification**: The GitHub Action (`pr-test.yml`) verifies that the dotfiles can be successfully built on each supported platform
- **Native Testing**: macOS has no equivalent official container image, so it runs the full install directly on a hosted `macos-latest` runner instead

- **Build Verification**: The GitHub Action (`pr-test.yml`) verifies that the dotfiles can be successfully built on each supported platform, and that the install actually landed (symlinks in place, fish functions loaded) — not just that the install command exited 0

### Workflow Details

The PR testing workflow:
1. Triggers on pull requests to `master` or `main` branches
2. Uses a matrix strategy to test against multiple Linux distributions
3. Sets up QEMU and Docker Buildx for multi-platform testing
4. Builds the dotfiles installation in each distribution's container
2. Uses a matrix strategy to test against multiple Linux distributions, plus a separate macOS job
3. Sets up QEMU and Docker Buildx for multi-platform Linux testing
4. Builds the dotfiles installation in each distribution's container, and runs the full install natively on macOS

This ensures that changes don't break compatibility with any supported operating system before they're merged.

Expand Down
1 change: 1 addition & 0 deletions install-scripts/01-install-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ if [ -f /etc/arch-release ]; then
# install yay
if ! command -v yay >/dev/null 2>&1 && [ "$EUID" -ne 0 ]; then
sudo pacman -S --noconfirm base-devel
rm -rf yay
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si --noconfirm
Expand Down
5 changes: 4 additions & 1 deletion install-scripts/07-last-touches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ if ! grep -q "$fish_path" /etc/shells; then
fi

# change shell to fish
# (via sudo + explicit user: plain `chsh` re-authenticates as the invoking
# user even when they already have sudo rights, which hangs non-interactive
# installs; root can change any user's shell without a further password)
if ! [ "$(basename "$SHELL")" == "fish" ]; then
chsh -s "$fish_path"
sudo chsh -s "$fish_path" "$(id -un)"
fi

# create local bin directory
Expand Down
Loading