Skip to content

Build and test Windows #43

Build and test Windows

Build and test Windows #43

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