From e2fb9011ec5622b06eb17054f542ae8a399f09a5 Mon Sep 17 00:00:00 2001 From: rakshit-verma Date: Fri, 5 Apr 2024 11:16:56 -0700 Subject: [PATCH] chore: move CI to GH actions --- .circleci/config.yml | 49 -------------------------------------- .github/workflows/unit.yml | 45 ++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 49 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/unit.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index dd30ab5..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,49 +0,0 @@ -version: 2.1 - -executors: - node: - docker: - - image: cimg/node:18.18.0 - -commands: - save_yarn_cache: - description: Save cache for future build - steps: - - save_cache: - key: v1-yarn-deps-{{ checksum "yarn.lock" }} - paths: - - ~/.cache/yarn - restore_yarn_cache: - description: Restore cache from previous build - steps: - - restore_cache: - keys: - - v1-yarn-deps-{{ checksum "yarn.lock" }} - -jobs: - build: - executor: node - steps: - - checkout - - restore_yarn_cache - - run: - name: Install dependencies and build - command: yarn install --frozen-lockfile - - save_yarn_cache - - run: - name: Check License Headers - command: yarn check-license-headers - - run: - name: Check formatting - command: yarn format:check - - run: - name: Run linter - command: yarn lint - - run: - name: Run unit tests - command: yarn test - -workflows: - build_and_test: - jobs: - - build diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml new file mode 100644 index 0000000..1af21b5 --- /dev/null +++ b/.github/workflows/unit.yml @@ -0,0 +1,45 @@ +name: Lint and unit tests + +on: + push: + branches: + - master + - 'spring*' + - 'summer*' + - 'winter*' + pull_request: + branches: + - master + - 'spring*' + - 'summer*' + - 'winter*' + +jobs: + lint-unit-tests: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20.11.0' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Check License Headers + run: yarn check-license-headers + + - name: Check formatting + run: yarn format:check + + - name: Run linter + run: yarn lint + + - name: Run unit tests + run: yarn test + +