-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add `install-modules` option * implement installing with cpanm * install extra modules * add working-directory option * add tests for instaling CPAN modules * fix the name of option * move the test to another workflow * fix the name of steps * configure environment values * set full path for cpanm * trim module names * install App::a2p instead of Module::CPANfile * fix module name * add installers to the build matrix * fix the name of the workflow * enable caching npm modules * fix the job name * save cache * implement installing with cpm * bump cache version * implement installWithCarton * use perl installed * add missing await * add --show-build-log-on-failure option * specify env * skip test of old perl * check whether cpanfile exists
- Loading branch information
1 parent
a3d77a0
commit 000f3d5
Showing
14 changed files
with
1,302 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: CPAN installer | ||
on: | ||
pull_request: | ||
paths: | ||
- "bin/cpanm" | ||
- "bin/cpm" | ||
- "bin/carton" | ||
- "__test__/**" | ||
- "src/**" | ||
- "package.json" | ||
- "package-lock.json" | ||
- "action.yml" | ||
push: | ||
branches: | ||
- "main" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
installer: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
installer: | ||
- cpanm | ||
- cpm | ||
- carton | ||
perl: | ||
- "5" # latest version of Perl 5 | ||
|
||
# TODO: fix cpm | ||
# - "5.8.1" # oldest version the original cpanm supports | ||
# TODO: @shogo82148 fix me | ||
# building ExtUtils::MakeMaker fails. | ||
# - "5.8.0" | ||
# TODO: fix cpm | ||
# - "5.6.2" | ||
# - "5.6.1" # oldest version the action supports | ||
# too old to work cpanm... I gave up. | ||
# - "5.6.0" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Get npm cache directory | ||
id: npm-cache | ||
run: | | ||
echo "::set-output name=dir::$(npm config get cache)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.npm-cache.outputs.dir }} | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run package | ||
|
||
- name: use the action | ||
uses: ./ | ||
with: | ||
perl-version: "${{ matrix.perl }}" | ||
install-modules-with: "${{ matrix.installer }}" | ||
install-modules: | | ||
ExtUtils::MakeMaker | ||
working-directory: __test__/p5-Test-Module | ||
- name: print the version of App::a2p and use it | ||
run: | | ||
perl -MApp::a2p -e 'print $App::a2p::VERSION' | ||
echo '$1' | a2p | ||
- name: print the version of ExtUtils::MakeMaker | ||
run: | | ||
perl -MExtUtils::MakeMaker -e 'print $ExtUtils::MakeMaker::VERSION' | ||
- run: ${{ matrix.installer }} --help | ||
- run: ${{ matrix.installer }} --version |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/node_modules/ | ||
/lib/ | ||
/__test__/runner/ | ||
local/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requires 'App::a2p'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.