From a80cdba2a08dbf31503c562b5eca599b4e7b7c6f Mon Sep 17 00:00:00 2001 From: Satyajit Sahoo Date: Wed, 13 Nov 2019 20:39:21 +0100 Subject: [PATCH] chore: migrate to Github Actions --- .circleci/config.yml | 66 ------------------------------------- .github/workflows/main.yaml | 47 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 66 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/main.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 64d32ae7..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,66 +0,0 @@ -version: 2 - -defaults: &defaults - docker: - - image: circleci/node:10 - working_directory: ~/project - -jobs: - install-dependencies: - <<: *defaults - steps: - - checkout - - attach_workspace: - at: ~/project - - restore_cache: - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - - v1-dependencies- - - run: yarn install --frozen-lockfile - - save_cache: - key: v1-dependencies-{{ checksum "yarn.lock" }} - paths: node_modules - - persist_to_workspace: - root: . - paths: . - lint-and-typecheck: - <<: *defaults - steps: - - attach_workspace: - at: ~/project - - run: | - yarn lint - yarn typescript - unit-test: - <<: *defaults - steps: - - attach_workspace: - at: ~/project - - run: | - yarn test --coverage - cat ./coverage/lcov.info | ./node_modules/.bin/codecov - - store_artifacts: - path: coverage - destination: coverage - build-packages: - <<: *defaults - steps: - - attach_workspace: - at: ~/project - - run: | - yarn lerna run prepare - -workflows: - version: 2 - build-and-test: - jobs: - - install-dependencies - - lint-and-typecheck: - requires: - - install-dependencies - - unit-test: - requires: - - install-dependencies - - build-packages: - requires: - - install-dependencies diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..5db96fbc --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,47 @@ +name: CI + +on: [push] + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Use Node.js 10 + uses: actions/setup-node@v1 + with: + node-version: 10 + + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache packages + uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + run: | + yarn --frozen-lockfile + + - name: Lint files + run: | + yarn lint + + - name: Typecheck files + run: | + yarn typescript + + - name: Run unit tests + run: | + yarn test --coverage + + - name: Build packages + run: | + yarn lerna run prepare