diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..8c1e931d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,59 @@ +# Javascript Node CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2 +jobs: + build: + docker: + # specify the version you desire here + - image: electronuserland/builder:wine + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/mongo:3.4.4 + + working_directory: ~/repo + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "package.json" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-{{ checksum "yarn.lock" }} + # install dependencies + - run: yarn install-all + # run tests! + - run: yarn test + + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ~/.cache/yarn + # build step + - run: yarn publish-app + # store binaries + - store_artifacts: + path: ./release/ +workflows: + version: 2 + main: + jobs: + - build: + filters: + branches: + only: master + tags: + only: /^v.*/ diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 634fa7f5..73c9ac90 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,31 +1,32 @@ name: Node CI -on: +on: push: # Sequence of patterns matched against refs/heads - branches: - - master # Push events on master branch + branches: + - master # Push events on master branch # Sequence of patterns matched against refs/tags - tags: - - "*" + tags: + - '*' jobs: build: + runs-on: ubuntu-latest strategy: matrix: - node-version: [12.x] + node-version: [8.x, 10.x, 12.x] steps: - - uses: actions/checkout@v1 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install dependencies and publish App - run: | - npm run install-all - npm run publish-app - env: - PROD: true + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, build, and test + run: | + npm run install-all + npm run publish-app + env: + PROD: true