From e7c3c538268ad0129a7470aa6f4e3cc6c3b2449c Mon Sep 17 00:00:00 2001 From: subash Date: Wed, 10 Feb 2021 17:29:33 +1100 Subject: [PATCH 1/2] chore: add codecov configuration --- .github/PULL_REQUEST_TEMPLATE.md | 8 ++++---- .github/workflows/publish.yml | 1 - codecov.yml | 12 +++++++++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3cac1b4..004c9c7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -27,8 +27,8 @@ Examples: ## Todos: -- [ ] Write tests -- [ ] Write documentation -- [ ] Fix linting errors -- [ ] Provide verification config/commands/resources +[] Write tests +[] Write documentation +[] Fix linting errors +[] Provide verification config/commands/resources diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2ca681b..d82a0e4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,4 +26,3 @@ jobs: run: yarn release env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - diff --git a/codecov.yml b/codecov.yml index 18455ef..747ea5a 100644 --- a/codecov.yml +++ b/codecov.yml @@ -3,7 +3,17 @@ coverage: project: default: target: auto - threshold: null + threshold: 90% + base: auto + flags: + - unit + paths: + - "src" + branches: + - master + if_ci_failed: error + informational: false + only_pulls: false comment: layout: "reach, diff, flags, files" From 6e89bf562907ef2051dd6a1bab677be95412a25a Mon Sep 17 00:00:00 2001 From: subash Date: Wed, 10 Feb 2021 17:40:31 +1100 Subject: [PATCH 2/2] chore: update publish action --- .github/workflows/publish.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d82a0e4..31b9daf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,8 @@ name: Publish on: - push: - branches: - - master + release: + types: [published] jobs: publish: @@ -16,13 +15,16 @@ jobs: - name: Use node 14.x uses: actions/setup-node@v1 with: - node-version: '14.x' - registry-url: 'https://registry.npmjs.org' + node-version: 14.x + registry-url: https://registry.npmjs.org - name: Install packages run: yarn install --frozen-lockfile + - name: Version + run: yarn version --new-version "${GITHUB_REF:11}" --no-git-tag-version --no-commit-hooks + - name: Publish to npm - run: yarn release + run: yarn publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}