-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (44 loc) · 1.51 KB
/
build-and-test-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build and test Windows
on:
workflow_dispatch
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-2019', 'windows-latest']
perl: ['5.34', '5.32', '5.30', '5.28', '5.26']
name: Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
# Set up Perl environment
- name: Set up Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
# Display Perl version
- name: Display Perl version
run: perl -V
# Install dependencies conditionally excluding JSONLD for Windows
- name: Install dependencies excluding JSONLD
run: |
# Exclude JSONLD module from cpanfile for Windows only and overwrite the original cpanfile
Get-Content cpanfile | Where-Object { $_ -notmatch 'JSONLD' } | Set-Content cpanfile.tmp
# Rename the temporary cpanfile, overwriting the original
Move-Item -Path cpanfile.tmp -Destination cpanfile -Force
# Use the temporary cpanfile to install dependencies
cpanm -n --installdeps .
shell: pwsh
# Run specific test files
- name: Run tests (no coverage)
run: |
#perl t/args.t
#perl t/cli.t
prove -l t
# Upload log files
- name: Upload Log Files
if: always()
uses: actions/upload-artifact@v2
with:
name: log-files
path: C:\Users\RUNNER~1\.cpanm\work\**\*.log