Skip to content

Commit

Permalink
ci: use exact node versions and setup headless chrome deps
Browse files Browse the repository at this point in the history
  • Loading branch information
pmmmwh committed May 17, 2020
1 parent 2b3cfcb commit a4a3ae4
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ version: 2.1
orbs:
node: circleci/[email protected]

commands:
setup-headless-chrome:
steps:
- run:
name: Install dependencies for Headless Chrome
command: |
sudo apt-get update
sudo apt-get install -yq \
gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \
libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
jobs:
test:
executor:
Expand All @@ -13,7 +27,7 @@ jobs:
default: ~/project
type: string
node-version:
default: '13'
default: '13.14'
type: string
setup:
default: []
Expand All @@ -23,24 +37,33 @@ jobs:
- steps: << parameters.setup >>
- node/install-packages:
app-dir: << parameters.app-dir >>
cache-key: yarn.lock
pkg-manager: yarn
- run:
name: Run Tests
command: yarn test
working_directory: << parameters.app-dir >>

workflows:
martix-tests:
test-matrix:
jobs:
- test:
name: test/node:10
node-version: '10'
node-version: '10.20'
setup:
- setup-headless-chrome
- test:
name: test/node:12
node-version: '12'
node-version: '12.16'
setup:
- setup-headless-chrome
- test:
name: test/node:13
node-version: '13'
node-version: '13.14'
setup:
- setup-headless-chrome
- test:
name: test/node:14
node-version: '14'
node-version: '14.2'
setup:
- setup-headless-chrome

0 comments on commit a4a3ae4

Please sign in to comment.