Quellcode durchsuchen

Test with GH Actions

DarthSim vor 3 Jahren
Ursprung
Commit
49492c4da5
1 geänderte Dateien mit 36 neuen und 0 gelöschten Zeilen
  1. 36 0
      .github/workflows/test.yml

+ 36 - 0
.github/workflows/test.yml

@@ -0,0 +1,36 @@
+name: Test
+
+on:
+  - push
+  - pull_request
+
+env:
+  CGO_LDFLAGS_ALLOW: "-s|-w"
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    container:
+      image: darthsim/imgproxy-ci:latest
+    strategy:
+      matrix:
+        go-version: ["1.18.x", "1.17.x", "1.16.x"]
+        vips-version: ["8.12", "8.11", "8.10"]
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - uses: actions/setup-go@v2
+        with:
+          go-version: ${{ matrix.go-version }}
+      - name: Cache mods
+        uses: actions/cache@v3
+        with:
+          path: ~/go/pkg/mod
+          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
+      - name: Download mods
+        run: go mod download
+      - name: Test
+        run: go test
+        env:
+          LD_LIBRARY_PATH: "${{ env.LD_LIBRARY_PATH }}:/root/vips/${{ matrix.vips-version }}/lib"
+          PKG_CONFIG_PATH: "${{ env.PKG_CONFIG_PATH }}:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"