-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
178 additions
and
19 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 |
---|---|---|
|
@@ -22,8 +22,9 @@ jobs: | |
needs: mbtiny-dist | ||
strategy: | ||
matrix: | ||
version: ["5.40","5.38", "5.36", "5.34", "5.18"] | ||
name: cpanm-dist-perl-${{ matrix.version }} | ||
os: ["ubuntu-latest", "macos-latest", "macos-13"] | ||
version: ["5.40","5.38", "5.18"] | ||
name: cpanm-dist-perl-${{ matrix.version }}-${{ matrix.os }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shogo82148/[email protected] | ||
|
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,39 @@ | ||
name: E2E | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- perlbrew | ||
|
||
jobs: | ||
ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
sudo apt-get update | ||
sudo apt-get install zsh | ||
- run: zsh ./test-e2e/run.zsh | ||
|
||
fedora: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: fedora:latest | ||
steps: | ||
- run: sudo dnf install -y zsh perl | ||
- uses: actions/checkout@v4 | ||
- run: zsh ./test-e2e/run.zsh | ||
|
||
macos: | ||
strategy: | ||
matrix: | ||
os: ["macos-latest", "macos-13"] | ||
name: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: shogo82148/[email protected] | ||
with: | ||
perl-version: "5.40" | ||
- uses: actions/checkout@v4 | ||
- run: /bin/zsh ./test-e2e/run.zsh |
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 |
---|---|---|
|
@@ -41,3 +41,4 @@ | |
^.circleci | ||
^.perlcriticrc | ||
^metamerge.json | ||
^test-e2e/ |
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
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ sub os { | |
} | ||
|
||
sub arch { | ||
(split(/-/, $Config{archname}, 2))[0] | ||
(split(/-/, $Config{myarchname}, 2))[0] | ||
} | ||
|
||
1; |
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
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,29 @@ | ||
|
||
test-perlbrew-self-install() { | ||
echo 'TEST - perlbrew self-install' | ||
|
||
assert-file-missing ~/perl5/perlbrew/bin/perlbrew | ||
|
||
assert-ok ./perlbrew self-install | ||
|
||
assert-file-exists ~/perl5/perlbrew/bin/perlbrew | ||
} | ||
|
||
test-perlbrew-install-skaji-relocatable-perl() { | ||
echo 'TEST - perlbrew install skaji-relocatable-perl' | ||
|
||
local PERLBREW=~/perl5/perlbrew/bin/perlbrew | ||
|
||
assert-file-exists $PERLBREW | ||
|
||
assert-dir-missing ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1 | ||
|
||
$PERLBREW install skaji-relocatable-perl-5.40.0.1 | ||
|
||
assert-dir-exists ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1 | ||
assert-file-exists ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1/bin/perl | ||
|
||
assert-ok ~/perl5/perlbrew/perls/skaji-relocatable-perl-5.40.0.1/bin/perl -v | ||
|
||
echo 'OK - perlbrew install skaji-relocatable-perl-5.40.0.1' | ||
} |
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,63 @@ | ||
|
||
## assert_ok <CMD> [ARGS]... | ||
assert-ok() { | ||
local what="$*" | ||
|
||
echo "RUN $what" | ||
echo "--------8<--------" | ||
$* | ||
rc=$? | ||
echo "-------->8--------" | ||
|
||
if [[ $rc -ne 0 ]]; then | ||
echo "FAIL - exit_status: $rc, command: $what" | ||
echo | ||
exit $rc | ||
else | ||
echo "OK - $what" | ||
fi | ||
} | ||
|
||
assert-file-exists() { | ||
local path=$1 | ||
|
||
if [[ -f $path ]]; then | ||
echo "OK - file exists $path" | ||
else | ||
echo "FAIL - file do not exist: $path" | ||
exit 1 | ||
fi | ||
} | ||
|
||
assert-file-missing() { | ||
local path=$1 | ||
|
||
if [[ ! -f $path ]]; then | ||
echo "OK - file missing $path" | ||
else | ||
echo "FAIL - file do exist: $path" | ||
exit 1 | ||
fi | ||
} | ||
|
||
assert-dir-exists() { | ||
local path=$1 | ||
|
||
if [[ -d $path ]]; then | ||
echo "OK - dir exists $path" | ||
else | ||
echo "FAIL - dir do not exist: $path" | ||
exit 1 | ||
fi | ||
} | ||
|
||
assert-dir-missing() { | ||
local path=$1 | ||
|
||
if [[ ! -d $path ]]; then | ||
echo "OK - dir missing $path" | ||
else | ||
echo "FAIL - dir do exist: $path" | ||
exit 1 | ||
fi | ||
} |
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,18 @@ | ||
#!/usr/bin/zsh | ||
|
||
local e2eDir=$(dirname $0) | ||
source $e2eDir/lib.zsh | ||
source $e2eDir/lib-tests.zsh | ||
|
||
echo "# uname -a" | ||
uname -a | ||
|
||
local testName=$1 | ||
|
||
if [[ ! -z $testName ]]; then | ||
$testName | ||
exit 0 | ||
fi | ||
|
||
test-perlbrew-self-install | ||
test-perlbrew-install-skaji-relocatable-perl |