@@ -3,12 +3,158 @@ name: check
33on : [push]
44
55jobs :
6- testing :
6+ cpanm :
77 runs-on : ubuntu-latest
8- name : Testing GitHub action
8+ name : " install cpanm "
99 steps :
1010 - uses : actions/checkout@v2
1111 - name : uses install-with-cpanm
1212 uses : ./
1313 - name : which cpanm
1414 run : which cpanm
15+
16+ # ## ------------------------------------------------
17+ # ## Install a single module
18+ # ## ------------------------------------------------
19+
20+ one_module :
21+ runs-on : ubuntu-latest
22+ name : " cpanm and a module"
23+ steps :
24+ - uses : actions/checkout@v2
25+ - name : uses install-with-cpanm
26+ uses : ./
27+ with :
28+ install : " Simple::Accessor"
29+ - run : perl -MSimple::Accessor -e1
30+
31+ # ## ------------------------------------------------
32+ # ## Install multiple modules
33+ # ## ------------------------------------------------
34+
35+ multiple_modules :
36+ runs-on : ubuntu-latest
37+ name : " cpanm & modules"
38+ steps :
39+ - uses : actions/checkout@v2
40+ - name : uses install-with-cpanm
41+ uses : ./
42+ with :
43+ install : |
44+ Simple::Accessor
45+ abbreviation
46+ - run : perl -MSimple::Accessor -e1
47+ - run : perl -Mabbreviation -e1
48+
49+ # ## ------------------------------------------------
50+ # ## Install modules from a cpanfile
51+ # ## ------------------------------------------------
52+
53+ cpanfile_root :
54+ runs-on : ubuntu-latest
55+ name : " cpanfile as root"
56+ steps :
57+ - uses : actions/checkout@v2
58+ - name : " Create a cpanfile"
59+ run : |
60+ echo "requires 'Simple::Accessor';" > cpanfile.test
61+ - name : uses install-with-cpanm
62+ uses : ./
63+ with :
64+ cpanfile : " cpanfile.test"
65+ - run : perl -MSimple::Accessor -e1
66+
67+ cpanfile_nonroot :
68+ runs-on : ubuntu-latest
69+ name : " cpanfile nonroot local::lib"
70+ steps :
71+ - uses : actions/checkout@v2
72+ - name : " Create a cpanfile"
73+ run : |
74+ echo "requires 'Simple::Accessor';" > cpanfile.test
75+ - name : uses install-with-cpanm
76+ uses : ./
77+ with :
78+ path : " cpanm-local"
79+ cpanfile : " cpanfile.test"
80+ sudo : false
81+ args : " -L vendor"
82+ - run : sudo perl cpanm-local local::lib
83+ - run : perl -Mlocal::lib=--no-create,vendor -MSimple::Accessor -e1
84+
85+ # ## ------------------------------------------------
86+ # ## Install a module and enable tests
87+ # ## ------------------------------------------------
88+
89+ with_tests :
90+ runs-on : ubuntu-latest
91+ name : " install with tests"
92+ steps :
93+ - uses : actions/checkout@v2
94+ - name : uses install-with-cpanm
95+ uses : ./
96+ with :
97+ install : " Simple::Accessor"
98+ tests : true
99+ args : " -v"
100+ - run : perl -MSimple::Accessor -e1
101+
102+ # ## ------------------------------------------------
103+ # ## check perl-tester
104+ # ## ------------------------------------------------
105+
106+ perl_tester :
107+ runs-on : ubuntu-latest
108+ name : " perl v${{ matrix.perl-version }}"
109+
110+ strategy :
111+ fail-fast : false
112+ matrix :
113+ perl-version :
114+ - " 5.30"
115+ - " 5.28"
116+ # ...
117+
118+ container :
119+ image : perldocker/perl-tester:${{ matrix.perl-version }}
120+
121+ steps :
122+ - uses : actions/checkout@v2
123+ - name : uses install-with-cpanm
124+ uses : ./
125+ with :
126+ sudo : false
127+ install : |
128+ abbreviation
129+ ACH
130+ # checking that both modules are installed
131+ - run : perl -Mabbreviation -e1
132+ - run : perl -MACH -e1
133+
134+ # # ------------------------------------------------
135+ # # testing with windows
136+ # # ------------------------------------------------
137+ windows :
138+ runs-on : windows-latest
139+ name : " windows"
140+
141+ steps :
142+ - name : Set up Perl
143+ run : |
144+ choco install strawberryperl
145+ echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin"
146+
147+ - name : perl -V
148+ run : perl -V
149+
150+ - uses : actions/checkout@v2
151+ - name : " install-with-cpanm"
152+
153+ uses : ./
154+ with :
155+ install : |
156+ abbreviation
157+ ACH
158+ # checking that both modules are installed
159+ - run : perl -Mabbreviation -e1
160+ - run : perl -MACH -e1
0 commit comments