Files
NativeScript/.github/workflows/apps_automated.yml
Igor Randjelovic 2f9e5c0b84 ci: use python3
2023-04-04 21:57:19 +02:00

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