From 9e6ca7184fda4fb37269ab33265cfc0197f15a50 Mon Sep 17 00:00:00 2001 From: Shane Date: Thu, 29 Apr 2021 14:33:41 -0700 Subject: [PATCH] fix: Add GitHub Actions and Remove CircleCI (#151) --- .circleci/config.yml | 66 ----------------------- .circleci/scripts/collect-har-artifact.sh | 9 ---- .circleci/scripts/deps-install.sh | 8 --- .github/workflows/build-test-lint.yml | 32 +++++++++++ 4 files changed, 32 insertions(+), 83 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100755 .circleci/scripts/collect-har-artifact.sh delete mode 100755 .circleci/scripts/deps-install.sh create mode 100644 .github/workflows/build-test-lint.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f3c148be..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,66 +0,0 @@ -version: 2.1 - -workflows: - build-test: - jobs: - - prep-deps - - test-lint: - requires: - - prep-deps - - test-build-unit: - requires: - - prep-deps - - all-tests-pass: - requires: - - test-lint - - test-build-unit - -jobs: - prep-deps: - docker: - - image: circleci/node:12 - steps: - - checkout - - run: - name: Install deps - command: | - .circleci/scripts/deps-install.sh - - run: - name: Collect yarn install HAR logs - command: | - .circleci/scripts/collect-har-artifact.sh - - persist_to_workspace: - root: . - paths: - - node_modules - - build-artifacts - - test-lint: - docker: - - image: circleci/node:12 - steps: - - checkout - - attach_workspace: - at: . - - run: - name: Lint - command: yarn lint - - test-build-unit: - docker: - - image: circleci/node:12 - steps: - - checkout - - attach_workspace: - at: . - - run: - name: Unit tests - command: yarn test - - all-tests-pass: - docker: - - image: circleci/node:12 - steps: - - run: - name: All tests passed - command: echo 'Great success' diff --git a/.circleci/scripts/collect-har-artifact.sh b/.circleci/scripts/collect-har-artifact.sh deleted file mode 100755 index 85d7dcce..00000000 --- a/.circleci/scripts/collect-har-artifact.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -set -x -set -e -set -u -set -o pipefail - -mkdir -p build-artifacts/yarn-install-har -mv ./*.har build-artifacts/yarn-install-har/ diff --git a/.circleci/scripts/deps-install.sh b/.circleci/scripts/deps-install.sh deleted file mode 100755 index 303897c2..00000000 --- a/.circleci/scripts/deps-install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -x -set -e -set -u -set -o pipefail - -yarn --frozen-lockfile --ignore-scripts --har diff --git a/.github/workflows/build-test-lint.yml b/.github/workflows/build-test-lint.yml new file mode 100644 index 00000000..b4d113ef --- /dev/null +++ b/.github/workflows/build-test-lint.yml @@ -0,0 +1,32 @@ +name: Build, Lint, and Test + +on: + push: + branches: [main] + pull_request: + +jobs: + build-lint-test: + name: Build, Lint, and Test + runs-on: ubuntu-20.04 + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn --frozen-lockfile --ignore-scripts + - run: yarn build + - run: yarn lint + - run: yarn test + all-jobs-pass: + name: All jobs pass + runs-on: ubuntu-20.04 + needs: + - build-lint-test + steps: + - uses: actions/checkout@v2 + - run: echo "Great success!"