]> Dogcows Code - chaz/p5-File-KDBX-XS/commitdiff
add unit test actions
authorCharles McGarvey <ccm@cpan.org>
Fri, 8 Apr 2022 21:16:16 +0000 (15:16 -0600)
committerCharles McGarvey <ccm@cpan.org>
Fri, 8 Apr 2022 21:16:16 +0000 (15:16 -0600)
.github/workflows/linux.yml [new file with mode: 0644]
.github/workflows/macos.yml [new file with mode: 0644]
.github/workflows/windows.yml [new file with mode: 0644]

diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
new file mode 100644 (file)
index 0000000..08eeed3
--- /dev/null
@@ -0,0 +1,38 @@
+name: linux
+
+on:
+  push:
+    branches: ["*"]
+  pull_request:
+    branches: ["*"]
+
+jobs:
+  unit-tests:
+    name: "Test perl v${{ matrix.perl }} on Linux"
+
+    runs-on: ubuntu-latest
+    container:
+      image: perldocker/perl-tester:${{ matrix.perl }}
+
+    strategy:
+      fail-fast: false
+      matrix:
+        perl:
+          - "5.34"
+          - "5.32"
+          - "5.30"
+          - "5.28"
+          - "5.26"
+          - "5.24"
+          - "5.22"
+          - "5.20"
+
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+      - name: Install author dependencies
+        run: dzil authordeps --missing |cpanm -n
+      - name: Install module dependencies
+        run: dzil listdeps --develop --missing |cpanm -n
+      - name: Run tests
+        run: dzil smoke --author --release
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
new file mode 100644 (file)
index 0000000..28434bf
--- /dev/null
@@ -0,0 +1,25 @@
+name: macos
+
+on:
+  push:
+    branches: ["*"]
+  pull_request:
+    branches: ["*"]
+
+jobs:
+  unit-tests:
+    name: "Test perl on macOS"
+
+    runs-on: macos-latest
+
+    steps:
+      - name: Install perl
+        run: brew install perl
+      - name: Print perl version
+        run: perl -V
+      - name: Checkout code
+        uses: actions/checkout@v3
+      - name: Install dependencies
+        run: curl -sL https://git.io/cpm |perl - install -g --with-develop --show-build-log-on-failure
+      - name: Run tests
+        run: dzil smoke --author --release
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
new file mode 100644 (file)
index 0000000..63e35f0
--- /dev/null
@@ -0,0 +1,27 @@
+name: windows
+
+on:
+  push:
+    branches: ["*"]
+  pull_request:
+    branches: ["*"]
+
+jobs:
+  unit-tests:
+    name: "Test perl on Windows"
+
+    runs-on: windows-latest
+
+    steps:
+      - name: Install perl
+        run: |
+          choco install strawberryperl
+          echo "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin" >>$GITHUB_PATH
+      - name: Print perl version
+        run: perl -V
+      - name: Checkout code
+        uses: actions/checkout@v3
+      - name: Install dependencies
+        run: curl -sL https://git.io/cpm |perl - install -g --with-develop --show-build-log-on-failure
+      - name: Run tests
+        run: dzil smoke --author --release
This page took 0.027125 seconds and 4 git commands to generate.