Added cordova global dependecy in CI.yml file #19
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: CI Workflow | |
# on: [push, pull_request] | |
# jobs: | |
# build-and-test: | |
# name: Build and Test | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Use Node.js | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: '20' | |
# - name: Install Dependencies | |
# run: npm install --force | |
# - name: Start Server | |
# run: npm start & npx wait-on --timeout 120000 http://localhost:4200/ | |
# - name: Run E2E Tests | |
# run: SERVE_PORT=4200 npm run ionic-e2e:run:web | |
# - name: Generate Report | |
# run: npm run generate:report | |
# if: always() | |
# - name: Upload Allure report | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: allure-report | |
# path: allure-report | |
# if: always() | |
# - name: Deploy to GitHub Pages | |
# uses: JamesIves/[email protected] | |
# with: | |
# branch: gh-pages # The branch to deploy to (GitHub Pages branch) | |
# folder: allure-report # The folder containing the report files | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
# if: always() | |
# - name: Build Project | |
# run: npm run build -- --prod --base-href="ionic-e2e" | |
# - name: Deploy to GitHub Pages | |
# uses: JamesIves/[email protected] | |
# with: | |
# branch: gh-pages # The branch to deploy to (GitHub Pages branch) | |
# folder: www # The folder the action should deploy | |
# token: ${{ secrets.GITHUB_TOKEN }} | |
name: CI Workflow | |
on: [push, pull_request] | |
jobs: | |
android-build: | |
name: Build for Android | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Set up Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Install Dependencies | |
run: | | |
npm install --force | |
npm install -g @ionic/cli | |
npm install -g cordova | |
- name: Build Android App | |
run: npm run ionic-e2e:build:android | |
# Make sure your build script is correctly set up to use ANDROID_SDK_ROOT | |
env: | |
ANDROID_SDK_ROOT: ${{ secrets.ANDROID_SDK_ROOT }} | |
build-and-test: | |
name: Build and Test for Web | |
runs-on: ubuntu-latest | |
needs: android-build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install Dependencies | |
run: npm install --force | |
- name: Start Server | |
run: npm start & npx wait-on --timeout 120000 http://localhost:4200/ | |
- name: Run E2E Tests | |
run: SERVE_PORT=4200 npm run ionic-e2e:run:web | |
- name: Generate Report | |
run: npm run generate:report | |
if: always() | |
- name: Upload Allure report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: allure-report | |
path: allure-report | |
if: always() | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch to deploy to | |
folder: allure-report # The folder containing the report files | |
token: ${{ secrets.GITHUB_TOKEN }} | |
if: always() | |