Skip to content

Commit 980d4c3

Browse files
authored
also test using local install.sh (#220)
* test * naming * add comments
1 parent 183993c commit 980d4c3

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/end-to-end.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,22 @@ jobs:
2323
with:
2424
node-version: ${{ matrix.node }}
2525

26-
- name: Install sqlx-ts
26+
- name: Install sqlx-ts using npm
2727
run: npm install
2828

29-
- name: Run sqlx-ts version
29+
- name: Run sqlx-ts version after install
3030
run: ./sqlx-ts --version
3131

32-
- name: run sqlx-ts help
32+
- name: run sqlx-ts help after install
33+
run: ./sqlx-ts --help
34+
35+
- name: Install using local install.sh
36+
run: node local-postinstall.js
37+
38+
- name: Run sqlx-ts version after local install
39+
run: ./sqlx-ts --version
40+
41+
- name: run sqlx-ts help after local install
3342
run: ./sqlx-ts --help
3443

3544
e2e:

node/local-postinstall.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This script is executed as part of sqlx-ts CI pipeline to test local ../scripts/install.sh changes
2+
// DO NOT USE THIS IN PRODUCTION
3+
let execSync = require('child_process').execSync
4+
let tag = require('./package.json').version
5+
6+
const os = process.platform
7+
const cpu = process.arch
8+
9+
execSync(`sh ../scripts/install.sh -s -- --os ${os} --cpu ${cpu} --tag ${tag} -f`, { stdio: 'inherit' })
10+
console.info('sqlx-ts installation successful')

0 commit comments

Comments
 (0)