Skip to content

Commit

Permalink
fix(action): modified workflow for beta (#18)
Browse files Browse the repository at this point in the history
* fix(action): modified workflow for beta

* fix(action): embedded test & coverage

* fix(action): rename process

* fix(action): rerun workflow if pr was edited

* fix(action): upload & download coverage artifact

* fix(action): artifact build fix

* fix(action): added new coverage reporter

* fix(action): run beta on sync

* fix(vitest): added lcov as coverage reporter

* fix(sonarcloud): added vitest lcov report to sonar

* fix(action): test

* fix(action): test

* fix(action): test

* fix(action): download coverage to folder

* fix(action): test
  • Loading branch information
StephanGerbeth authored Sep 16, 2024
1 parent db23070 commit 08a9e9b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ on:
types:
- opened
- reopened
- edited
- synchronize
branches:
- 'beta'
- beta

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -47,11 +49,18 @@ jobs:
- name: Lint
run: npm run lint

- name: Test
run: npm run test
- name: Vitest - Test & Coverage
run: npm run coverage

- name: Archive vitest code coverage results
uses: actions/upload-artifact@v4
with:
name: vitest-code-coverage-report
path: ./coverage/

sonarcloud:
name: SonarCloud
needs: install
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -63,6 +72,13 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Download vitest code coverage results
uses: actions/download-artifact@v4
with:
name: vitest-code-coverage-report
path: ./coverage/
- name: check
run: cd coverage && find .
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand All @@ -71,7 +87,7 @@ jobs:

semantic-version:
name: Semantic Release
needs: install
needs: sonarcloud
runs-on: ${{ matrix.os }}

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
/.env
/.coverage
/.DS_Store
/coverage
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
sonar.projectKey=basics_rxjs-collection
sonar.organization=basics

sonar.cpd.exclusions=packages/**/*.test.js
sonar.cpd.exclusions=./packages/**/*.test.js
sonar.javascript.lcov.reportPaths=./coverage/lcov.info

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=rxjs-collection
Expand Down
4 changes: 2 additions & 2 deletions vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ export default defineConfig({
test: {
coverage: {
provider: 'v8',
reporter: ['text', 'json'],
reportsDirectory: './.coverage',
reporter: ['text', 'json', 'lcov'],
reportsDirectory: './coverage',
exclude: [
...configDefaults.exclude,
'commitlint.config.js',
Expand Down

0 comments on commit 08a9e9b

Please sign in to comment.