Skip to content

Commit 773e091

Browse files
committed
addeded github actions for cross-platform testing
1 parent b8e5860 commit 773e091

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test nvm-pl
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, windows-latest, macos-latest]
14+
perl-version: ["5.38"]
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Perl
23+
uses: shogo82148/actions-setup-perl@v1
24+
with:
25+
perl-version: ${{ matrix.perl-version }}
26+
27+
- name: Install dependencies
28+
run: |
29+
cpanm --quiet --notest --installdeps .
30+
# Windows might need additional modules
31+
if [ "$RUNNER_OS" == "Windows" ]; then
32+
cpanm --quiet --notest Win32::Job Win32::Process
33+
fi
34+
35+
- name: Run tests
36+
run: |
37+
prove -lv t/
38+
39+
- name: Build distribution
40+
run: |
41+
perl Makefile.PL
42+
make
43+
make test
44+
make dist # Ensure distribution builds correctly

0 commit comments

Comments
 (0)