Skip to content

Commit

Permalink
chore: Add Debian 11/i386 Vagrant test
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Oct 2, 2021
1 parent f262a03 commit 57ff617
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ jobs:
- name: Test
run: |
( cd assets/docker && ./test.sh archlinux )
test-debian-i386:
runs-on: macos-latest
env:
VAGRANT_BOX: debian11-i386
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache Vagrant Boxes
uses: actions/cache@v2
with:
path: ~/.vagrant.d
key: ${{ runner.os }}-vagrant-${{ env.VAGRANT_BOX }}-${{ hashFiles('assets/vagrant/*.Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-${{ env.VAGRANT_BOX }}-
- name: Test
run: |
( cd assets/vagrant && ./test.sh debian11-i386 )
test-fedora:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -271,6 +288,7 @@ jobs:
needs:
- generate
- lint
- test-debian-i386
- test-fedora
- test-freebsd
- test-macos
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ test:
${GO} test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o022" ./...
${GO} test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o002" ./...

.PHONY: test-os
test-os:
( cd assets/vagrant && ./test.sh fedora33 freebsd13 openbsd6 )
.PHONY: test-vagrant
test-vagrant:
( cd assets/vagrant && ./test.sh debian11-i386 freebsd13 openbsd6 )

.PHONY: coverage-html
coverage-html: coverage
Expand Down
10 changes: 10 additions & 0 deletions assets/vagrant/debian11-i386.Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Vagrant.configure("2") do |config|
config.vm.box = "generic-x32/debian11"
config.vm.define "debian11-i386"
config.vm.hostname = "debian11-i386"
config.vm.synced_folder ".", "/chezmoi", type: "rsync"
config.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noninteractive apt-get install -y age gpg golang unzip zip
SHELL
config.vm.provision "file", source: "assets/vagrant/debian11-i386.test-chezmoi.sh", destination: "test-chezmoi.sh"
end
11 changes: 11 additions & 0 deletions assets/vagrant/debian11-i386.test-chezmoi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -eufo pipefail

GO_VERSION=$(grep GO_VERSION: /chezmoi/.github/workflows/main.yml | awk '{ print $2 }' )

go get "golang.org/dl/go${GO_VERSION}"
"${HOME}/go/bin/go${GO_VERSION}" download
export PATH="${HOME}/sdk/go${GO_VERSION}/bin:${PATH}"

( cd /chezmoi && go test ./... )

0 comments on commit 57ff617

Please sign in to comment.