依赖于使用MicroPhone的NodeJS项目的GitHub操作



我正在尝试使用Github Actions执行我的自动化NodeJS测试脚本。我的一些测试依赖于使用系统中的麦克风,因为我的应用程序中有一个录音机。在Github操作中,使用系统麦克风的测试在云上不起作用。有没有人如果有任何方法可以在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后,我的问题得到了解决

最新更新