Minor tweaks and add tests, bump to v2.0.1 #80
This file contains hidden or 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: "CI" | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| node: [20] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - run: npm ci | |
| - run: npm run all | |
| test-cordova: | |
| name: Test (Cordova) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Setup environment | |
| uses: ./ | |
| with: | |
| legacy: true | |
| install-pods: ${{ matrix.os == 'macos-latest' }} | |
| - name: Verify CLI | |
| run: | | |
| cordova -v | |
| ionic info || true | |
| java -version | |
| javac -version | |
| - name: Build Android sample | |
| run: | | |
| ionic start testapp blank --cordova --type angular --no-link --no-git --no-interactive --confirm | |
| cd testapp | |
| ionic cordova platform add android@latest | |
| ionic cordova build android | |
| - name: Upload Android APK (Cordova) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-apk-cordova-${{ matrix.os }} | |
| path: | | |
| testapp/platforms/android/app/build/outputs/apk/**/*.apk | |
| retention-days: 7 | |
| - name: Build iOS sample (macOS only) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: | | |
| cd testapp | |
| ionic cordova platform add ios@latest | |
| ionic cordova build ios --no-interactive -- --buildFlag="-sdk iphonesimulator" | |
| test-capacitor: | |
| name: Test (Capacitor) | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| CAPACITOR_ANDROID_STUDIO_PATH: /usr/bin/false | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Setup environment | |
| uses: ./ | |
| with: | |
| legacy: false | |
| install-pods: ${{ matrix.os == 'macos-latest' }} | |
| - name: Verify CLI | |
| run: | | |
| cap --version | |
| ionic info || true | |
| java -version | |
| javac -version | |
| - name: Build Android sample | |
| run: | | |
| ionic start testapp blank --type angular --no-link --no-git --no-interactive --confirm | |
| cd testapp | |
| ionic cap add android | |
| ionic cap build android --no-open | |
| - name: Inject Gradle Java 17 (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: bash scripts/inject-gradle-java17.sh testapp | |
| - name: Inject Gradle Java 17 (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: pwsh -File scripts/inject-gradle-java17.ps1 -AppPath testapp | |
| - name: Upload Android APK (Capacitor) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-apk-${{ runner.os }} | |
| path: | | |
| testapp/android/app/build/outputs/apk/debug/*.apk | |
| testapp\android\app\build\outputs\apk\debug\*.apk | |
| retention-days: 7 | |
| - name: Build iOS sample (macOS only) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: | | |
| cd testapp | |
| ionic cap add ios | |
| npx cap sync ios | |
| xcodebuild -workspace ios/App/App.xcworkspace -scheme App -sdk iphonesimulator -configuration Debug build |