mirror of
https://github.com/appium/appium.git
synced 2026-01-06 02:09:59 -06:00
108 lines
2.7 KiB
YAML
108 lines
2.7 KiB
YAML
name: Appium Build
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- appium3
|
|
# this list of paths could potentially impact the build
|
|
paths:
|
|
- '**/tsconfig*.json'
|
|
- 'packages/base-driver/static/**/*'
|
|
- 'packages/*/test/**'
|
|
- 'packages/*/bin'
|
|
- 'packages/**/*.ts'
|
|
- 'packages/**/*.json'
|
|
- 'packages/**/*.js'
|
|
- 'package*.json'
|
|
- 'lerna.json'
|
|
- '.npmrc'
|
|
- '.mocharc.js'
|
|
- '.github/workflows/build.yml' # this file
|
|
- '.eslintrc'
|
|
- '.eslintignore'
|
|
- '!**/sample-code/**'
|
|
- '!packages/*/docs/**'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- appium3
|
|
paths:
|
|
- '**/tsconfig*.json'
|
|
- 'packages/base-driver/static/**/*'
|
|
- 'packages/*/test/**'
|
|
- 'packages/*/bin'
|
|
- 'packages/**/*.ts'
|
|
- 'packages/**/*.json'
|
|
- 'packages/**/*.js'
|
|
- 'package*.json'
|
|
- 'lerna.json'
|
|
- '.npmrc'
|
|
- '.mocharc.js'
|
|
- '.github/workflows/build.yml' # this file
|
|
- '.eslintrc'
|
|
- '.eslintignore'
|
|
- '!**/sample-code/**'
|
|
- '!packages/*/docs/**'
|
|
|
|
env:
|
|
CI: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
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
|
|
|
|
test:
|
|
needs:
|
|
- prepare_matrix
|
|
name: Tests
|
|
strategy:
|
|
matrix:
|
|
node-version: ${{ fromJSON(needs.prepare_matrix.outputs.versions) }}
|
|
os:
|
|
- ubuntu-latest
|
|
# TODO: Windows is not stable and slow to run
|
|
# - windows-latest
|
|
# TODO: Enable below envs after all tests have been verified green
|
|
# - macos-latest
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: ${{ matrix.node-version }}
|
|
cache: 'npm'
|
|
- name: Install dependencies
|
|
uses: bahmutov/npm-install@v1
|
|
with:
|
|
useRollingCache: true
|
|
install-command: npm ci --foreground-scripts
|
|
- name: Run smoke, unit & E2E tests
|
|
run: npm run test:ci
|
|
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install dependencies
|
|
uses: bahmutov/npm-install@v1
|
|
with:
|
|
useRollingCache: true
|
|
install-command: npm ci
|
|
- name: ESLint
|
|
run: npm run lint:ci
|