Skip to content

App Plugin smoke test (init, build and deploy) #1475

App Plugin smoke test (init, build and deploy)

App Plugin smoke test (init, build and deploy) #1475

name: App Plugin smoke test (init, build and deploy)
on:
workflow_dispatch:
inputs:
branch-name:
description: 'Branch name to checkout'
required: false
default: 'master'
schedule:
# Run daily at midnight UTC
- cron: '15 0 * * *'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
node-version: [20.x, 22.x, 24.x]
os: [ubuntu-latest]
steps:
- name: Checkout e2e-tests repo (for scripts)
uses: actions/checkout@v3
with:
path: e2e-tests
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup CLI
uses: actions/checkout@v3
with:
repository: adobe/aio-cli-plugin-app
ref: ${{ github.event.inputs.branch-name }}
path: aio-cli-plugin-app
- name: Update package.json oclif.plugins
uses: jossef/action-set-json-field@v2.1
with:
file: aio-cli-plugin-app/package.json
field: oclif.plugins
value: "[\"@adobe/aio-cli-plugin-app-templates\"]"
parse_json: true
- name: Auth
uses: adobe/aio-apps-action@3.3.1
with:
os: ${{ matrix.os }}
command: oauth_sts
CLIENTID: ${{ secrets.IMS_CLIENT_ID }}
CLIENTSECRET: ${{ secrets.IMS_CLIENT_SECRET }}
IMSORGID: ${{ secrets.IMS_ORG_ID }}
SCOPES: ${{ secrets.IMS_SCOPES }}
# we are using dummy values as they are not needed to generate oauth_s2s tokens
# see https://github.com/adobe/aio-lib-ims-oauth/issues/114
TECHNICALACCOUNTID: dummy_id
TECHNICALACCOUNTEMAIL: dummy_email
- id: create
name: Create app with no extensions
working-directory: aio-cli-plugin-app
run: node ../e2e-tests/smoke-tests/create-app.js
env:
AIO_RUNTIME_AUTH: ${{ secrets.RUNTIME_AUTH }}
AIO_RUNTIME_NAMESPACE: ${{ secrets.RUNTIME_NAMESPACE }}
- id: app_pack
name: Pack an app (uses previous created app)
working-directory: aio-cli-plugin-app
run: node ../e2e-tests/smoke-tests/pack.js
- id: app_install
name: Install an app (uses previous packed app)
working-directory: aio-cli-plugin-app
run: node ../e2e-tests/smoke-tests/install.js
- id: createext
name: Create app with extension
working-directory: aio-cli-plugin-app
run: node ../e2e-tests/smoke-tests/create-app-extension.js
env:
AIO_RUNTIME_AUTH: ${{ secrets.RUNTIME_AUTH }}
AIO_RUNTIME_NAMESPACE: ${{ secrets.RUNTIME_NAMESPACE }}
- id: output
name: Write the output to console for debugging
if: ${{ failure() }}
working-directory: aio-cli-plugin-app
run: |
if [ -d "ffapp" ]; then
echo "=== Console output from ffapp/consoleoutput.txt ==="
cat ffapp/consoleoutput.txt
else
echo "ffapp directory not found"
fi
- id: slacknotification
name: Slack Notification
if: ${{ failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: 'Node version'
SLACK_MESSAGE: ${{ matrix.node-version }}
SLACK_COLOR: ${{ job.status }}