Files
appium/.github/workflows/build.yml
T
Christopher Hiller c653d2cf3b chore: lint the code once per build action
Previously, every version of Node.js would run eslint, which is redundant
2022-03-10 10:52:02 -08:00

52 lines
1.4 KiB
YAML

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Appium Build
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install latest npm
run: npm install -g npm
- name: Install dependencies
run: npm install
- name: Run unit tests
run: npm run test:ci
- name: Install @appium/fake-driver
run: npm run install-fake-driver
- name: Run E2E tests
run: npm run e2e-test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: ESLint
run: npm run lint
docs:
name: Build Command Documentation
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: npm install
- name: Generate docs
run: npm run generate-docs