简体   繁体   中英

GitHub Actions for NodeJS Project that is dependent on using MicroPhone

I am trying to execute my automated NodeJS test scripts using Github Actions. Some of my tests are dependent on using Microphones from the system as there is a voice recorder in my application. The tests that use the system microphone are not working on cloud in Github actions. Does anyone if there is any way to enable mic on any OS provided by Github - Mac, Windows, Ubuntu

name: Node.js CI

on: [push]

jobs:
  build:

    runs-on: macos-latest

    strategy:
      matrix:
        node-version: [10.16.3]

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        browser: chrome  
        node-version: ${{ matrix.node-version }}
    - run: npm install
    - run: npm run test:e2e

在 ChromeOptions 中添加--use-fake-device-for-media-stream后,我的问题得到解决

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM