Skip to content

Update GitHub checkout action #9

Update GitHub checkout action

Update GitHub checkout action #9

Workflow file for this run

name: 'Build & Test'
on: [push, pull_request_target]
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
run: npm ci --ignore-scripts
- name: Lint
run: npm run lint
- name: Build
run: npm run build
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Setup BrowserStack environment
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: Start BrowserStack tunnel
uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random
- name: Run tests on BrowserStack
run: npm run test-remote
- name: Stop BrowserStack tunnel
uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop
- name: Report code coverage
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov.info