diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f6c178a..c40f835 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -5,8 +5,7 @@ name: build
on:
push:
branches:
- - master
- - develop
+ - '**'
pull_request:
branches:
- master
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index f78cfdc..94dba48 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -5,15 +5,15 @@ name: test
on:
push:
branches:
- - master
- - develop
+ - '**'
+
pull_request:
branches:
- master
- develop
jobs:
- build:
+ test:
runs-on: ubuntu-latest
@@ -50,18 +50,13 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: coverage/stslib/coverage-summary.json
- - name: Commit coverage badges
- run: |
- git config --local user.email "action@github.com"
- git config --local user.name "GitHub Action"
- git commit -m "Badge update" -- badges
- - name: Read current branch name
- uses: nelonoel/branch-name@v1
- # Use branch name for whatever purpose
- - run: echo ${BRANCH_NAME}
- - name: Push changes
- uses: ad-m/github-push-action@master
+ # Coverage badges will be updated on any branch except protected
+ # branches 'develop' and 'master' and on a pull requests
+ - name: Test angular action
+ uses: demyanets/angular-coverage-badges-action@v1
with:
- branch: ${{ env.BRANCH_NAME }}
- github_token: ${{ secrets.GITHUB_TOKEN }}
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ coverage-summary-path: coverage/stslib/coverage-summary.json
+ protected-branches: '["master", "develop"]'
+ write-debug-logs: true
diff --git a/badges/coverage.svg b/badges/coverage.svg
deleted file mode 100644
index 32a123d..0000000
--- a/badges/coverage.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/badges/stslib/.gitignore b/badges/stslib/.gitignore
new file mode 100644
index 0000000..0cca74e
--- /dev/null
+++ b/badges/stslib/.gitignore
@@ -0,0 +1,6 @@
+# Ignore everything in this directory
+*
+# Except this file, badges and subdirectories
+!.gitignore
+!*.svg
+!/**
\ No newline at end of file
diff --git a/badges/stslib/coverage-branches.svg b/badges/stslib/coverage-branches.svg
new file mode 100644
index 0000000..6a80a68
--- /dev/null
+++ b/badges/stslib/coverage-branches.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/badges/stslib/coverage-functions.svg b/badges/stslib/coverage-functions.svg
new file mode 100644
index 0000000..84bbab9
--- /dev/null
+++ b/badges/stslib/coverage-functions.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/badges/stslib/coverage-lines.svg b/badges/stslib/coverage-lines.svg
new file mode 100644
index 0000000..23c6658
--- /dev/null
+++ b/badges/stslib/coverage-lines.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/badges/stslib/coverage-statements.svg b/badges/stslib/coverage-statements.svg
new file mode 100644
index 0000000..d12b298
--- /dev/null
+++ b/badges/stslib/coverage-statements.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/badges/stslib/coverage.svg b/badges/stslib/coverage.svg
new file mode 100644
index 0000000..bb18c72
--- /dev/null
+++ b/badges/stslib/coverage.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 14223ea..6528d08 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7439,15 +7439,6 @@
"sourcemap-codec": "^1.4.4"
}
},
- "make-coverage-badge": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/make-coverage-badge/-/make-coverage-badge-1.2.0.tgz",
- "integrity": "sha512-nA1eQZJ9vcY2UoQLVIdzqyRoNtAZHWlXJfrHkaMB/pQgTYBPmbImkykfxWeAtUQuLJXzb6eAhbR7nEgrt+S7FA==",
- "dev": true,
- "requires": {
- "mri": "1.1.4"
- }
- },
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
@@ -8008,12 +7999,6 @@
}
}
},
- "mri": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz",
- "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==",
- "dev": true
- },
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
diff --git a/package.json b/package.json
index 7cd4062..8375c06 100644
--- a/package.json
+++ b/package.json
@@ -10,8 +10,7 @@
"e2e": "ng e2e",
"clean": "rimraf ./dist",
"build:prod": "ng build --prod",
- "make:badge": "make-coverage-badge --report-path=./coverage/stslib/coverage-summary.json --output-path=badges/coverage.svg",
- "test:ci": "npm run clean && ng test --watch=false --browsers=ChromeHeadlessCustom --codeCoverage=true && npm run make:badge",
+ "test:ci": "npm run clean && ng test --watch=false --browsers=ChromeHeadlessCustom --codeCoverage=true",
"build:ci": "npm run clean && npm run build:prod",
"publish:lib": "cd dist && cd stslib && npm publish"
},
@@ -48,11 +47,11 @@
"karma-htmlfile-reporter": "^0.3.8",
"karma-jasmine": "~3.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
- "make-coverage-badge": "^1.2.0",
"ng-packagr": "^9.0.0",
"npm": "^6.14.5",
"protractor": "~5.4.3",
"puppeteer": "^3.0.2",
+ "rimraf": "^3.0.2",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.8.3"