ci: Use shared workflows (#21766)

This commit is contained in:
Mykola Mokhnach
2025-11-30 23:13:29 +01:00
committed by GitHub
parent d1eb6856ba
commit ecbc7c4879
3 changed files with 15 additions and 40 deletions
+10 -19
View File
@@ -15,10 +15,6 @@ inputs:
description: Whether to run npm run build
required: false
default: 'true'
clear-v8-cache:
description: Whether to clear V8 code cache (for Node.js 24+ compatibility)
required: false
default: 'true'
runs:
using: composite
@@ -28,23 +24,18 @@ runs:
with:
node-version: ${{ inputs.node-version }}
cache: npm
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: SocketDev Security Check
uses: SocketDev/action@v1
with:
useRollingCache: true
install-command: ${{ inputs.install-command }}
mode: firewall-free
- name: Install dependencies
shell: bash
run: |
# Replace npm with sfw npm in the install command
install_cmd="${{ inputs.install-command }}"
install_cmd="${install_cmd//npm /sfw npm }"
$install_cmd
- name: Build packages
if: ${{ inputs.run-build == 'true' }}
shell: bash
run: npm run build
- name: Clear V8 code cache
if: ${{ inputs.clear-v8-cache == 'true' }}
shell: bash
run: |
# Clear V8 code cache to avoid bytecode deserialization errors
if [[ -d "$HOME/.node" ]]; then
rm -rf "$HOME/.node"/* 2>/dev/null || true
fi
if [[ -d "$HOME/.cache/node" ]]; then
rm -rf "$HOME/.cache/node"/* 2>/dev/null || true
fi
+1 -12
View File
@@ -54,13 +54,7 @@ concurrency:
jobs:
prepare_matrix:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.generate-matrix.outputs.lts }}
steps:
- name: Select all current LTS versions of Node.js
id: generate-matrix
uses: msimerson/node-lts-versions@v1
uses: appium/appium-workflows/.github/workflows/node-lts-matrix.yml@main
prepare_e2e_packages:
runs-on: ubuntu-latest
@@ -123,7 +117,6 @@ jobs:
node-version: ${{ matrix.node-version }}
install-command: npm ci --foreground-scripts
run-build: 'true'
clear-v8-cache: 'true'
- name: Run smoke tests
run: npm run test:smoke
@@ -143,7 +136,6 @@ jobs:
node-version: ${{ matrix.node-version }}
install-command: npm ci --foreground-scripts
run-build: 'true'
clear-v8-cache: 'true'
- name: Run unit tests
run: npm run test:unit
@@ -163,7 +155,6 @@ jobs:
node-version: ${{ matrix.node-version }}
install-command: npm ci --foreground-scripts
run-build: 'true'
clear-v8-cache: 'true'
- name: Run type tests
run: npm run test:types
@@ -187,7 +178,6 @@ jobs:
node-version: ${{ matrix.node-version }}
install-command: npm ci --foreground-scripts
run-build: 'true'
clear-v8-cache: 'true'
- name: Run E2E tests for ${{ matrix.package_dir }}
run: |
set -o pipefail
@@ -205,6 +195,5 @@ jobs:
node-version: lts/*
install-command: npm ci
run-build: 'false'
clear-v8-cache: 'false'
- name: ESLint
run: npm run lint:ci
+4 -9
View File
@@ -4,12 +4,7 @@ on:
types: [opened, edited, synchronize, reopened]
jobs:
conventional:
name: PR Title
runs-on: ubuntu-latest
steps:
- uses: beemojs/conventional-pr-action@v3
with:
config-preset: angular
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
lint:
uses: appium/appium-workflows/.github/workflows/pr-title.yml@main
with:
config-preset: angular