Skip to content

Commit 2b9b164

Browse files
committed
Tweak ci workflow
1 parent 7dead49 commit 2b9b164

File tree

2 files changed

+36
-29
lines changed

2 files changed

+36
-29
lines changed

.github/workflows/check.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
uses: ./
5151
with:
5252
install: "Simple::Accessor"
53+
- run: perl -MSimple::Accessor -e1
5354

5455
### ------------------------------------------------
5556
### Install multiple modules
@@ -65,7 +66,9 @@ jobs:
6566
with:
6667
install: |
6768
Simple::Accessor
68-
Test::Parallel
69+
abbreviation
70+
- run: perl -MSimple::Accessor -e1
71+
- run: perl -Mabbreviation -e1
6972

7073
### ------------------------------------------------
7174
### Install modules from a cpanfile
@@ -78,11 +81,12 @@ jobs:
7881
- uses: actions/checkout@v2
7982
- name: "Create a cpanfile"
8083
run: |
81-
echo "requires 'A1z::Html';" > cpanfile.test
84+
echo "requires 'Simple::Accessor';" > cpanfile.test
8285
- name: uses install-with-cpm
8386
uses: ./
8487
with:
8588
cpanfile: "cpanfile.test"
89+
- run: perl -MSimple::Accessor -e1
8690

8791
cpanfile_nonroot:
8892
runs-on: ubuntu-latest
@@ -91,14 +95,16 @@ jobs:
9195
- uses: actions/checkout@v2
9296
- name: "Create a cpanfile"
9397
run: |
94-
echo "requires 'A1z::Html';" > cpanfile.test
98+
echo "requires 'Simple::Accessor';" > cpanfile.test
9599
- name: uses install-with-cpm
96100
uses: ./
97101
with:
98102
cpanfile: "cpanfile.test"
99103
sudo: false
100104
global: false
101105
path: "cpm"
106+
- run: sudo perl cpm install -g local::lib
107+
- run: perl -Mlocal::lib=--no-create,local -MSimple::Accessor -e1
102108

103109
### ------------------------------------------------
104110
### Install a module and enable tests
@@ -159,12 +165,13 @@ jobs:
159165
- uses: actions/checkout@v2
160166
- name: "Create a cpanfile"
161167
run: |
162-
echo "requires 'A1z::Html';" > cpanfile.test
168+
echo "requires 'Simple::Accessor';" > cpanfile.test
163169
- name: uses install-with-cpm
164170
uses: ./
165171
with:
166172
cpanfile: "cpanfile.test"
167173
args: "--with-recommends --with-suggests"
174+
- run: perl -MSimple::Accessor -e1
168175

169176
## ------------------------------------------------
170177
## testing with windows

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Possible values: true | false [default: true]
8686

8787
### `args`
8888

89-
Extra arguments to pass to the cplay command line.
89+
Extra arguments to pass to the cpm command line.
9090

9191
### `sudo`
9292

@@ -205,28 +205,28 @@ Disable the `-g` flag.
205205
Here is a sample job using cpm to install modules on windows.
206206

207207
```yaml
208-
windows:
209-
runs-on: windows-latest
210-
name: "windows"
211-
212-
steps:
213-
- name: Set up Perl
214-
run: |
215-
choco install strawberryperl
216-
echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin"
217-
218-
- name: perl -V
219-
run: perl -V
220-
221-
- uses: actions/checkout@v2
222-
- name: "install-with-cpm"
223-
224-
uses: perl-actions/[email protected]
225-
with:
226-
install: |
227-
abbreviation
228-
ACH
229-
# checking that both modules are installed
230-
- run: perl -Mabbreviation -e1
231-
- run: perl -MACH -e1
208+
windows:
209+
runs-on: windows-latest
210+
name: "windows"
211+
212+
steps:
213+
- name: Set up Perl
214+
run: |
215+
choco install strawberryperl
216+
echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin"
217+
218+
- name: perl -V
219+
run: perl -V
220+
221+
- uses: actions/checkout@v2
222+
- name: "install-with-cpm"
223+
224+
uses: perl-actions/[email protected]
225+
with:
226+
install: |
227+
abbreviation
228+
ACH
229+
# checking that both modules are installed
230+
- run: perl -Mabbreviation -e1
231+
- run: perl -MACH -e1
232232
```

0 commit comments

Comments
 (0)