File tree Expand file tree Collapse file tree 5 files changed +31
-0
lines changed Expand file tree Collapse file tree 5 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 13
13
dfx-version : ${{ matrix.version }}
14
14
install-moc : true
15
15
vessel-version : 0.7.0
16
+ pocketic-version : 3.0.1
16
17
- run : |
17
18
dfx --version
18
19
moc --version
19
20
vessel --version
21
+ pocket-ic --version
Original file line number Diff line number Diff line change 7
7
dfx-disable-encryption :
8
8
description : ' Whether to use the .pem encryption.'
9
9
default : " false"
10
+ pocketic-version :
11
+ description : ' The pocket ic version to download. If empty pocket ic will not be installed.'
10
12
install-moc :
11
13
description : ' Whether to install moc through dfx.'
12
14
default : " false"
Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ function run() {
53
53
// Configured to run on linux by default.
54
54
let bin = '/home/runner/bin';
55
55
let vesselBuild = 'linux64';
56
+ let pocketicBuild = 'linux';
56
57
// Alter params if running on macOS.
57
58
if (os_1.default.platform() === 'darwin') {
58
59
bin = '/usr/local/share';
59
60
vesselBuild = 'macos';
61
+ pocketicBuild = 'darwin';
60
62
}
61
63
// Die if not running on linux or macOS.
62
64
if (!['linux', 'darwin'].includes(os_1.default.platform())) {
@@ -125,6 +127,15 @@ function run() {
125
127
const vesselPath = yield io.which('vessel');
126
128
infoExec(`${vesselPath} --version`);
127
129
}
130
+ // Install PocketIC.
131
+ const pocketicVersion = core.getInput('pocketic-version');
132
+ if (pocketicVersion) {
133
+ child_process_1.default.execSync(`wget -O ${bin}/pocket-ic.gz https://github.com/dfinity/pocketic/releases/download/${pocketicVersion}/pocket-ic-x86_64-${pocketicBuild}.gz`);
134
+ child_process_1.default.execSync(`gunzip ${bin}/pocket-ic.gz`);
135
+ child_process_1.default.execSync(`chmod +x ${bin}/pocket-ic`);
136
+ const pocketicPath = yield io.which('pocket-ic');
137
+ infoExec(`${pocketicPath} --version`);
138
+ }
128
139
});
129
140
}
130
141
exports.run = run;
Original file line number Diff line number Diff line change 13
13
"keywords" : [
14
14
" dfx" ,
15
15
" vessel" ,
16
+ " pocket-ic" ,
16
17
" moc" ,
17
18
" motoko" ,
18
19
" dfinity" ,
Original file line number Diff line number Diff line change @@ -8,11 +8,13 @@ export async function run() {
8
8
// Configured to run on linux by default.
9
9
let bin = '/home/runner/bin' ;
10
10
let vesselBuild = 'linux64' ;
11
+ let pocketicBuild = 'linux' ;
11
12
12
13
// Alter params if running on macOS.
13
14
if ( os . platform ( ) === 'darwin' ) {
14
15
bin = '/usr/local/share' ;
15
16
vesselBuild = 'macos' ;
17
+ pocketicBuild = 'darwin' ;
16
18
}
17
19
18
20
// Die if not running on linux or macOS.
@@ -96,6 +98,19 @@ export async function run() {
96
98
const vesselPath = await io . which ( 'vessel' ) ;
97
99
infoExec ( `${ vesselPath } --version` ) ;
98
100
}
101
+
102
+ // Install PocketIC.
103
+ const pocketicVersion = core . getInput ( 'pocketic-version' ) ;
104
+ if ( pocketicVersion ) {
105
+ cp . execSync (
106
+ `wget -O ${ bin } /pocket-ic.gz https://github.com/dfinity/pocketic/releases/download/${ pocketicVersion } /pocket-ic-x86_64-${ pocketicBuild } .gz`
107
+ ) ;
108
+ cp . execSync ( `gunzip ${ bin } /pocket-ic.gz` ) ;
109
+ cp . execSync ( `chmod +x ${ bin } /pocket-ic` ) ;
110
+
111
+ const pocketicPath = await io . which ( 'pocket-ic' ) ;
112
+ infoExec ( `${ pocketicPath } --version` ) ;
113
+ }
99
114
}
100
115
101
116
function infoExec ( command : string ) : string {
You can’t perform that action at this time.
0 commit comments