Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

chore(deps): update dependency husky to v7 #500

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 0 additions & 96 deletions .circleci/config.yml

This file was deleted.

120 changes: 101 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,109 @@
name: CI
name: CI/CD for the js-sdk

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
pull_request:
types: [opened,reopened]
branches:
- 'main'
- 'beta'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
# This job uses skip-duplicate-actions to skip one of the duplicate workflow runs when you push to a branch with an open PR.
check_duplicate_workflow:
needs: []
runs-on: ubuntu-20.04
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.1
with:
skip_after_successful_duplicate: 'true'
concurrent_skipping: 'same_content_newer'

lint:
needs: [check_duplicate_workflow]
runs-on: ubuntu-20.04
if: ${{ needs.check_duplicate_workflow.outputs.should_skip != 'true' }}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
cache: 'yarn'
- name: Run lint
run: |
yarn install
yarn lint

build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: [check_duplicate_workflow]
runs-on: ubuntu-20.04
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
cache: 'yarn'
- name: Build bundles
run: |
yarn install
yarn rollup
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.sha }}-${{ github.run_id }}-bundles
path: dist
retention-days: 3

# Steps represent a sequence of tasks that will be executed as part of the job
test:
needs: [check_duplicate_workflow]
runs-on: ubuntu-20.04
env:
MOCHA_FILE: test-results/mocha/test-results.xml
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
cache: 'yarn'
- name: Run tests
run: |
yarn install
yarn test-output
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.sha }}-${{ github.run_id }}-${{ github.job }}-results
path: test-results
retention-days: 3
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v1.27
with:
files: test-results/**/*.xml

release:
needs: [lint, build, test]
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/beta') }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELASTICPATH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Trigger CircleCI
env:
CIRCLE_BRANCH: ${{ github.head_ref }}
run: |
curl -X POST \
-H 'Circle-Token: ${CIRCLE_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d "{\"branch\":\"${CIRCLE_BRANCH}\"}" \
https://circleci.com/api/v2/project/gh/moltin/js-sdk/pipeline
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.10.0'
cache: 'yarn'
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.sha }}-${{ github.run_id }}-bundles
- name: Release, publish package
run: |
yarn install
npx semantic-release
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,4 @@ You can learn more about the Rollup API and configuration [here](https://github.
## Terms And Conditions

- Any changes to this project must be reviewed and approved by the repository owner. For more information about contributing, see the [Contribution Guide](https://github.com/moltin/gatsby-demo-store/blob/master/.github/CONTRIBUTING.md).
- For more information about the license, see [MIT License](https://github.com/moltin/js-sdk/blob/master/LICENSE).
- For more information about the license, see [MIT License](https://github.com/moltin/js-sdk/blob/main/LICENSE).
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"type": "git",
"url": "git://github.com/moltin/js-sdk.git"
},
"release": {
"branches": ["main", "beta"]
},
"bugs": {
"url": "https://github.com/moltin/js-sdk/issues"
},
Expand All @@ -45,7 +48,7 @@
"eslint-config-prettier": "2.10.0",
"eslint-plugin-import": "2.14.0",
"eslint-plugin-prettier": "2.7.0",
"husky": "0.14.3",
"husky": "7.0.4",
"lint-staged": "7.3.0",
"mocha": "^9.2.2",
"mocha-junit-reporter": "1.18.0",
Expand Down
34 changes: 4 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1398,11 +1398,6 @@ chokidar@3.5.3, chokidar@^3.5.0:
optionalDependencies:
fsevents "~2.3.2"

ci-info@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==

class-utils@^0.3.5:
version "0.3.6"
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
Expand Down Expand Up @@ -2655,14 +2650,10 @@ hosted-git-info@^2.1.4:
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9"
integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==

husky@0.14.3:
version "0.14.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3"
integrity sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA==
dependencies:
is-ci "^1.0.10"
normalize-path "^1.0.0"
strip-indent "^2.0.0"
husky@7.0.4:
version "7.0.4"
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==

iconv-lite@^0.4.24:
version "0.4.24"
Expand Down Expand Up @@ -2830,13 +2821,6 @@ is-callable@^1.1.4, is-callable@^1.2.4:
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945"
integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==

is-ci@^1.0.10:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c"
integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==
dependencies:
ci-info "^1.5.0"

is-core-module@^2.8.1:
version "2.8.1"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211"
Expand Down Expand Up @@ -3667,11 +3651,6 @@ normalize-package-data@^2.3.2:
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"

normalize-path@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379"
integrity sha1-MtDkcvkf80VwHBWoMRAY07CpA3k=

normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
Expand Down Expand Up @@ -4651,11 +4630,6 @@ strip-eof@^1.0.0:
resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=

strip-indent@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=

strip-json-comments@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
Expand Down