]> go.fuhry.dev Git - fsnotify.git/commitdiff
debian 6 test: deal with multiple packages (#474)
authorMartin Tournoij <martin@arp242.net>
Fri, 29 Jul 2022 23:33:19 +0000 (01:33 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Jul 2022 23:33:19 +0000 (01:33 +0200)
* debian 6 test: deal with multiple packages

The ./cmd/fsnotify doesn't have any tests, but sooner or later we'll
have subpackages so deal with it properly now.

* Cache vagrant boxes

.github/workflows/vagrant.yml

index 0b63f05d5322ef5d641bba86336bdf169d1c3fc9..1cb822f81d62fbcc340f9d3d96798756caa10ee5 100644 (file)
@@ -11,7 +11,16 @@ jobs:
           - debian6
     runs-on: macos-12
     steps:
-      - uses: actions/checkout@v3
+      - name: checkout
+        uses: actions/checkout@v3
+
+      - name: Cache Vagrant boxes
+        uses: actions/cache@v3
+        with:
+          path: ~/.vagrant.d/boxes
+          key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
+          restore-keys: |
+            ${{ runner.os }}-vagrant-
 
       - name: setup Go
         uses: actions/setup-go@v3
@@ -21,6 +30,12 @@ jobs:
       - name: test
         run: |
           cp -f .github/workflows/Vagrantfile.${{ matrix.image }} Vagrantfile
-          GOOS=linux GOARCH=amd64 go test -o fsnotify.test -c ./...
+          export GOOS=linux
+          export GOARCH=amd64
+          for p in $(go list ./...); do
+            go test -c -o ${p//\//-}.test $p
+          done
           vagrant up
-          vagrant ssh -c "/vagrant/fsnotify.test"
+          for t in *.test; do
+            vagrant ssh -c "/vagrant/$t"
+          done