From 2e5a4cdab7173d4d7819b2a4d09009b1daabaf3a Mon Sep 17 00:00:00 2001 From: Rick Markins Date: Fri, 5 Nov 2021 09:57:47 -0700 Subject: [PATCH 1/2] dist: migrate to GH actions --- .circleci/config.yml | 38 ------------------------------------- .github/CODEOWNERS | 1 + .github/workflows/cicd.yaml | 29 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 38 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/cicd.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 0557496..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,38 +0,0 @@ -# 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: circleci/node:10 - - 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- - - - run: npm install - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - # run tests - - run: npm test - - # run lint - - run: npm run lint - - # run coverage - - run: npm run coverage diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..28828f1 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +@godaddy/javascript \ No newline at end of file diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml new file mode 100644 index 0000000..aeddb28 --- /dev/null +++ b/.github/workflows/cicd.yaml @@ -0,0 +1,29 @@ +name: 'CICD' + +on: ['push', 'pull_request'] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node: ['12', '14', '16'] + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + cache: 'npm' + cache-dependency-path: '**/package-lock.json' + - name: Install dependencies + run: npm ci + - name: Test + run: npm test + - name: Lint + run: npm run lint + - name: Coverage + run: npm run coverage \ No newline at end of file From cecbdc4e6e8571b9c07dbf5c940c36c916eebad1 Mon Sep 17 00:00:00 2001 From: Rick Markins Date: Fri, 5 Nov 2021 10:00:32 -0700 Subject: [PATCH 2/2] dist: tweak triggers --- .github/workflows/cicd.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index aeddb28..f249a6f 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -1,6 +1,12 @@ name: 'CICD' -on: ['push', 'pull_request'] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: build: