mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
66 lines
1.6 KiB
YAML
66 lines
1.6 KiB
YAML
name: 'apps/automated'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'ci/**'
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: macos-12
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '11'
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3'
|
|
|
|
- name: Install NativeScript
|
|
run: |
|
|
python3 -m pip install --upgrade pip six
|
|
npm i -g nativescript --ignore-scripts --legacy-peer-deps
|
|
ns usage-reporting disable
|
|
ns error-reporting disable
|
|
ns doctor
|
|
|
|
- name: Setup
|
|
run: npm run setup
|
|
|
|
- name: Unit Tests
|
|
run: npx nx run-many --target=test --configuration=ci --projects=core
|
|
|
|
- name: Create Emulator
|
|
uses: rigor789/action-create-emulator@main
|
|
|
|
- name: Test (Android)
|
|
run: node tools/scripts/run-automated.js android
|
|
|
|
- name: Start iOS Simulator
|
|
if: ${{ always() && !cancelled() }} # run iOS tests even if Android tests failed
|
|
uses: futureware-tech/simulator-action@v2
|
|
with:
|
|
model: 'iPhone 13 Pro Max'
|
|
os_version: '>=15.0'
|
|
|
|
- name: Test (iOS)
|
|
if: ${{ always() && !cancelled() }} # run iOS tests even if Android tests failed
|
|
run: node tools/scripts/run-automated.js ios
|