Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated GH Action Trigger Branch Name #14

Merged
merged 4 commits into from
Oct 2, 2024
Merged
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
8 changes: 4 additions & 4 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![Maintainability Badge](https://sonarcloud.io/api/project_badges/measure?project=Supermarcel10_TFGCalculator&metric=sqale_rating)
![Reliability Badge](https://sonarcloud.io/api/project_badges/measure?project=Supermarcel10_TFGCalculator&metric=reliability_rating)
![Bug Badge](https://sonarcloud.io/api/project_badges/measure?project=Supermarcel10_TFGCalculator&metric=bugs)
![Tech Debt Badge](https://sonarcloud.io/api/project_badges/measure?project=Supermarcel10_TFGCalculator&metric=sqale_index)
![Maintainability Badge](https://sonarcloud.io/api/project_badges/measure?project=TFGCalculator&metric=sqale_rating)
![Reliability Badge](https://sonarcloud.io/api/project_badges/measure?project=TFGCalculator&metric=reliability_rating)
![Bug Badge](https://sonarcloud.io/api/project_badges/measure?project=TFGCalculator&metric=bugs)
![Tech Debt Badge](https://sonarcloud.io/api/project_badges/measure?project=TFGCalculator&metric=sqale_index)

# TeraFirmaGreg Alloy Calculator

Expand Down
68 changes: 34 additions & 34 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: Test and SonarCloud analysis

on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]

jobs:
test-and-analyze:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests and generate coverage
run: npm run test:coverage

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
#name: Test and SonarCloud analysis
#
#on:
# push:
# branches: [ master, dev ]
# pull_request:
# branches: [ master, dev ]
#
#jobs:
# test-and-analyze:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Use Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# cache: 'npm'
#
# - name: Install dependencies
# run: npm ci
#
# - name: Run tests and generate coverage
# run: npm run test:coverage
#
# - name: SonarCloud Scan
# uses: SonarSource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5 changes: 4 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.organization=supermarcel10
sonar.projectKey=TFGCalculator

sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.sources=src
sonar.tests=test
sonar.test.inclusions=**/*.test.ts