Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 60 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,72 @@
name: CI

on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
type: choice
options:
- info
- warning
- debug
Comment on lines +6 to +14
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch defines an input logLevel, but it isn’t used or forwarded to any job. If it’s not needed, remove it to avoid confusion; if it is needed, pass it through to the relevant reusable workflow via with:.

Suggested change
logLevel:
description: 'Log level'
required: true
default: 'info'
type: choice
options:
- info
- warning
- debug

Copilot uses AI. Check for mistakes.
Comment on lines +12 to +14
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_dispatch.inputs.logLevel.options list items are not indented under options:. As written, this YAML is invalid and the workflow will fail to load; indent the - info/- warning/- debug lines under options:.

Suggested change
- info
- warning
- debug
- info
- warning
- debug

Copilot uses AI. Check for mistakes.
git-ref:
description: Git Ref (Optional)
required: false
push:
branches:
- master
- main
- '**-rc'
- production
- 'production-hotfix'
- 'v*'
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
branches:
- master
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull_request is configured only for master, but push includes main, release, and production branches. If PRs can target those branches (especially main), the CI jobs won’t run for them; consider aligning the pull_request.branches list with push.branches.

Suggested change
- master
- master
- main
- '**-rc'
- production
- 'production-hotfix'
- 'v*'

Copilot uses AI. Check for mistakes.
- main

permissions:
checks: write
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
pull-requests: write # Required by sonar workflow for PR decoration

jobs:
run-lint:
runs-on: ubuntu-latest
lint-test:
if: ${{ github.event_name == 'pull_request' }}
name: Quality Assurance
uses: kobiton/deployment/.github/workflows/ci-lint-test.yaml@master
with:
node-version: '22.13.1'
sync-submodule: 'true'
secrets: inherit

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
build-push-image:
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
name: Build and Push image to ECR
uses: kobiton/deployment/.github/workflows/ci.yaml@master
with:
git-ref: ${{ github.event.inputs.git-ref }}
Copy link

Copilot AI Mar 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git-ref contains a hyphen, so github.event.inputs.git-ref will be parsed as an expression (subtraction) rather than a property lookup. Use bracket notation (github.event.inputs['git-ref']) or rename the input to git_ref and update the reference.

Suggested change
git-ref: ${{ github.event.inputs.git-ref }}
git-ref: ${{ github.event.inputs['git-ref'] }}

Copilot uses AI. Check for mistakes.
repo-name: 'appium-script-generator'
secrets: inherit

- uses: actions/setup-node@v3
with:
node-version: 20.10.0
# --- Feature-per-Release: Build, push, and deploy on PR ---

- name: Install dependencies
run: |
npm install -g yarn
yarn install --frozen-lockfile --non-interactive
detect-target-env:
if: ${{ github.event_name == 'pull_request' }}
uses: kobiton/deployment/.github/workflows/detect-target-env.yaml@master
secrets: inherit

- name: Lint
run: |
yarn lint

run-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- uses: actions/setup-node@v3
with:
node-version: 20.10.0

- name: Install dependencies
run: |
npm install -g yarn
yarn install --frozen-lockfile --non-interactive

- name: Test
run: |
yarn test
build-push-image-pr:
needs: [lint-test, detect-target-env]
if: ${{ github.event_name == 'pull_request' }}
name: Build and Push image to ECR (PR)
uses: kobiton/deployment/.github/workflows/ci.yaml@master
with:
repo-name: appium-script-generator
sync-submodule: 'true'
sandbox-env: ${{ needs.detect-target-env.outputs.environment }}
branch-name: ${{ github.head_ref }}
secrets: inherit
33 changes: 33 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: SonarQube

on:
workflow_dispatch:
inputs:
git-ref:
description: Git Ref (Optional)
required: false
schedule:
# Trigger at 09:30pm every Friday ICT
- cron: "30 2 * * 5"

push:
branches:
- 'master'
- 'main'

pull_request:
branches:
- 'master'
- 'main'

jobs:
build:
if: github.event.repository.owner.login == 'kobiton'
name: Scans
uses: kobiton/deployment/.github/workflows/sonar.yaml@master
with:
repo-name: appium-script-generator
git-ref: ${{ github.event.inputs.git-ref }}
sonar-project-key: kobiton-appium-script-generator
node-version: '20.10.0'
secrets: inherit