atcheck/lsscanner/new_ubuntu/node_modules/electron-rebuild/.circleci/config.yml

86 lines
2.1 KiB
YAML

step-restore-cache: &step-restore-cache
restore_cache:
keys:
- v1-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
- v1-dependencies-{{ arch }}
steps-test: &steps-test
steps:
- checkout
- *step-restore-cache
- run:
name: Install Node
command: |
case "$(uname -s)" in
Darwin)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 8
nvm alias default 8
echo 'export NVM_DIR=${HOME}/.nvm' >> $BASH_ENV
echo "[ -s '${NVM_DIR}/nvm.sh' ] && . '${NVM_DIR}/nvm.sh'" >> $BASH_ENV
;;
Windows*|CYGWIN*|MINGW*|MSYS*)
nvm install 12.8.0
nvm use 12.8.0
;;
esac
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ arch }}-{{ checksum "package-lock.json" }}
- run: npm test
version: 2.1
orbs:
win: circleci/windows@1.0.0
jobs:
test-linux-8:
docker:
- image: circleci/node:8
<<: *steps-test
test-linux-10:
docker:
- image: circleci/node:10
<<: *steps-test
test-mac:
macos:
xcode: "10.2.0"
<<: *steps-test
test-windows:
executor:
name: win/vs2019
shell: bash.exe
<<: *steps-test
release:
docker:
- image: circleci/node:10.15
steps:
- checkout
- *step-restore-cache
- run: npm install
- run: npx semantic-release
workflows:
version: 2
test_and_release:
# Run the test jobs first, then the release only when all the test jobs are successful
jobs:
- test-linux-8
- test-linux-10
- test-mac
- test-windows
- release:
requires:
- test-linux-8
- test-linux-10
- test-mac
- test-windows
filters:
branches:
only:
- master