Skip to content

Commit f13edcd

Browse files
committed
ci: update build workflow to install NativeScript CLI
1 parent b74d17e commit f13edcd

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
name: Build
22

3+
permissions:
4+
contents: read
5+
36
env:
47
NX_BRANCH: ${{ github.event.number || github.ref_name }}
58
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
69

710
# --- Customize the test environment here ---
811
NODE_VERSION: lts/*
912
TEST_PROJECT: nativescript-demo-ng
13+
# NativeScript CLI (provides the `ns` binary the nx test executor spawns)
14+
NS_CLI_VERSION: latest
1015
# iOS (runner label is set on the job's `runs-on`, it can't read env)
1116
XCODE_VERSION: "^16.0"
1217
# Android
@@ -61,6 +66,8 @@ jobs:
6166
- uses: nrwl/nx-set-shas@v5
6267
- name: npm install
6368
run: npm install --force
69+
- name: Install NativeScript CLI
70+
run: npm install -g nativescript@${{ env.NS_CLI_VERSION }}
6471
- name: Test on iOS Simulator
6572
run: npx nx test ${{ env.TEST_PROJECT }} ios --flags="--justlaunch"
6673

@@ -86,6 +93,8 @@ jobs:
8693
- uses: nrwl/nx-set-shas@v5
8794
- name: npm install
8895
run: npm install --force
96+
- name: Install NativeScript CLI
97+
run: npm install -g nativescript@${{ env.NS_CLI_VERSION }}
8998
- name: Enable KVM
9099
run: |
91100
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules

0 commit comments

Comments
 (0)