Skip to content

test: move test to arkvm #47

test: move test to arkvm

test: move test to arkvm #47

Workflow file for this run

name: Build test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
name: Build on ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup OpenHarmony SDK
uses: openharmony-rs/[email protected]
id: setup-ohos
with:
version: '5.0.0'
- name: Setup Zig for OpenHarmony
uses: openharmony-zig/[email protected]
id: setup-zig
with:
tag: '0.16.0'
- name: Build
run: |
pushd examples/basic && zig build && popd
pushd examples/init && zig build && popd
arkvm-tests:
runs-on: ubuntu-latest
name: ArkTS N-API tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zig for OpenHarmony
uses: openharmony-zig/[email protected]
with:
tag: '0.16.0'
- name: Setup arkvm
id: setup-arkvm
uses: harmony-contrib/[email protected]
with:
cache: true
- name: Validate Ark host bundle
env:
ARK_HOST_TOOLS_DIR: ${{ steps.setup-arkvm.outputs.arkvm-path }}
run: |
set -euo pipefail
test -x "${ARK_HOST_TOOLS_DIR}/ark_js_napi_cli"
test -x "${ARK_HOST_TOOLS_DIR}/es2abc"
test -f "${ARK_HOST_TOOLS_DIR}/libace_napi.so"
- name: Run ArkTS tests
env:
ARK_HOST_TOOLS_DIR: ${{ steps.setup-arkvm.outputs.arkvm-path }}
run: bash ./scripts/arkvm/run_arkvm_tests.sh