chore(all): update template, update tests #444
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: | |
- master | |
- "[0-9]+_[0-9]+_X" | |
pull_request: | |
env: | |
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 170 # Default is 20 | |
jobs: | |
build: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
node: [ '16' ] | |
name: Node ${{ matrix.node }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Cache Node.js modules | |
id: node-cache | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-node-modules- | |
${{ runner.OS }}- | |
- run: npm ci | |
name: Install dependencies | |
if: steps.node-cache.outputs.cache-hit != 'true' | |
- run: npm run lint | |
name: Lint | |
- name: Build and Test | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
target: playstore | |
script: npm run unit-test | |
emulator-options: -no-window -noaudio -no-boot-anim | |
disable-animations: true # defaulting to true, the commands sent to emulator to do this sometimes run too quickly after boot and cause "adb: device offline" failures | |
- run: npm pack | |
name: Package | |
if: matrix.node == '16' | |
- uses: actions/upload-artifact@v2 | |
if: matrix.node == '16' | |
with: | |
name: node-titanium-sdk | |
path: node-titanium-sdk-*.tgz |