97 строки
2.9 KiB
YAML
97 строки
2.9 KiB
YAML
version: 2.1
|
|
|
|
orbs:
|
|
cfa: continuousauth/npm@2.1.1
|
|
node: electronjs/node@2.3.1
|
|
|
|
jobs:
|
|
test:
|
|
environment:
|
|
# prevent Wine popup dialogs about installing additional packages
|
|
WINEDLLOVERRIDES: mscoree,mshtml=
|
|
WINEDEBUG: -all
|
|
executor: <<parameters.executor>>
|
|
parameters:
|
|
executor:
|
|
description: The executor to use for the job.
|
|
type: string
|
|
node-version:
|
|
description: Specify the Node.js version to install.
|
|
type: string
|
|
steps:
|
|
- node/test:
|
|
checkout-steps:
|
|
- when:
|
|
condition:
|
|
equal: [ node/macos, << parameters.executor >> ]
|
|
steps:
|
|
- restore_cache:
|
|
name: Restoring Homebrew cache
|
|
paths:
|
|
- /usr/local/Homebrew
|
|
keys:
|
|
- v1-brew-cache-{{ arch }}
|
|
- run:
|
|
name: Install OS Dependencies
|
|
command: |
|
|
case "$(uname)" in
|
|
Linux)
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt-get update
|
|
sudo apt-get install --no-install-recommends -y wine64 wine32 wine
|
|
;;
|
|
Darwin)
|
|
brew install --cask xquartz
|
|
brew install --cask --no-quarantine wine-stable
|
|
;;
|
|
esac
|
|
- when:
|
|
condition:
|
|
equal: [ node/macos, << parameters.executor >> ]
|
|
steps:
|
|
- save_cache:
|
|
name: Persisting Homebrew cache
|
|
paths:
|
|
- /usr/local/Homebrew
|
|
key: v1-brew-cache-{{ arch }}
|
|
- checkout
|
|
node-version: << parameters.node-version >>
|
|
|
|
workflows:
|
|
test_and_release:
|
|
# Run the test jobs first, then the release only when all the test jobs are successful
|
|
jobs:
|
|
- test:
|
|
name: test-<< matrix.executor >>-<< matrix.node-version >>
|
|
pre-steps:
|
|
# rc-edit.exe does not support arm64
|
|
- when:
|
|
condition:
|
|
and:
|
|
- equal: [ node/macos, << matrix.executor >> ]
|
|
steps:
|
|
- node/install-rosetta
|
|
matrix:
|
|
alias: test
|
|
parameters:
|
|
executor:
|
|
- node/linux
|
|
- node/macos
|
|
- node/windows
|
|
node-version:
|
|
- '20.9'
|
|
- '18.17'
|
|
- '16.20'
|
|
- '14.21'
|
|
exclude:
|
|
- executor: node/macos
|
|
node-version: '14.21'
|
|
- cfa/release:
|
|
requires:
|
|
- test
|
|
filters:
|
|
branches:
|
|
only:
|
|
- main
|
|
context: cfa-release
|