Skip to content

Merge pull request #1993 from bugsnag/revert-lerna-version-bump #3126

Merge pull request #1993 from bugsnag/revert-lerna-version-bump

Merge pull request #1993 from bugsnag/revert-lerna-version-bump #3126

Workflow file for this run

name: '@bugsnag/electron'
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
electron: [ '^12.0.0', '^20.0.0' ]
node-version: [12, 14]
os: [ ubuntu-20.04, windows-2019 ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: (Act) install build tools and dependencies
run: |
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install build-essential xvfb libnss3 libatk1.0-0 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libasound2 libgbm1
# electron-forge requires yarn for some reason
npm install --global yarn
if: ${{ env.ACT && contains(matrix.os, 'ubuntu-20.04') }}
- name: Get npm cache directory
id: npm-cache-dir
if: ${{ !env.ACT }}
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache
if: ${{ !env.ACT }}
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install electron@${{ matrix.electron }} --no-audit --progress=false --no-save
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npm ci --no-audit --progress=false
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
- run: npx lerna bootstrap
- run: npm run build:electron
shell: bash
- run: sudo apt-get install cppcheck --assume-yes
name: Install cppcheck
if: contains(matrix.os, 'ubuntu')
- run: npm run test:lint-native
name: Lint C/C++ extensions
if: contains(matrix.os, 'ubuntu')
- name: (macOS) disable crash dialog
if: contains(matrix.os, 'macos')
run: defaults write com.apple.CrashReporter DialogType none
- name: run unit tests
run: npm run test:unit:electron-runner
- name: run integration tests
run: npm run test:electron
shell: bash
env:
START_LOCAL_NPM: 1
VERBOSE: 1
ELECTRON_VERSION: ${{ matrix.electron }}
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cucumber-failures
path: test/.cucumber-failures/