Skip to content

Commit

Permalink
Merge pull request #64 from vlad-ko/feature/sfo-demo
Browse files Browse the repository at this point in the history
adding a function
  • Loading branch information
vlad-ko authored Oct 30, 2024
2 parents a0c4bc2 + 97cf8ee commit 5f38ad0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
run: npm run test

- name: Upload Javascript coverage
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/index.html
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/coverage-final.json

- name: Trigger notifications
run: ./codecov send-notifications -t ${{ secrets.CODECOV_TOKEN }}
14 changes: 10 additions & 4 deletions .github/workflows/pr-only.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ jobs:
run: vendor/bin/phpunit --testsuite="Services Tests" --coverage-clover=coverage-service.xml --log-junit junit-service.xml

- name: Upload Service coverage report
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage-service.xml
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n service-${{ github.run_id }} -F service -f coverage-service.xml

- name: Run Controller Testsuite with Coverage
run: vendor/bin/phpunit --testsuite="Controllers Tests" --coverage-clover=coverage-controller.xml --log-junit junit-controller.xml

- name: Upload Controller coverage report
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'controller'-${{ github.run_id }} -F controller -f coverage-controller.xml
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n controller-${{ github.run_id }} -F controller -f coverage-controller.xml

- name: Run Unit Testsuite with Coverage and Junit output
run: vendor/bin/phpunit --testsuite="Unit Tests" --coverage-clover=coverage-unit.xml --log-junit junit-unit.xml

- name: Upload unit test coverage report
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'unit'-${{ github.run_id }} -F unit -f coverage-unit.xml
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n unit-${{ github.run_id }} -F unit -f coverage-unit.xml

- name: Upload Junit test results to Codecov
if: ${{ !cancelled() }}
Expand All @@ -108,8 +108,14 @@ jobs:
run: npm run test

- name: Upload Javascript coverage
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n 'javascript'-${{ github.run_id }} -F 'javascript' -f coverage/index.html
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n javascript-${{ github.run_id }} -F javascript -f coverage/coverage-final.json

- name: Create a dummy file
run: touch dummy-file.txt

- name: Upload dummy file to Codecov
run: ./codecov upload-process --disable-search -t ${{ secrets.CODECOV_TOKEN }} -n dummy-${{ github.run_id }} -F dummy -f dummy-file.txt

- name: Trigger notifications
run: ./codecov send-notifications -t ${{ secrets.CODECOV_TOKEN }}

12 changes: 5 additions & 7 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ coverage:
target: 80%
flags:
- javascript

codecov:
notify:
manual_trigger: true
notify_error: true

github_checks: #does not work if flags are configured
annotations: true
Expand Down Expand Up @@ -63,14 +68,7 @@ component_management:
individual_components:
- component_id: "backend"
name: "backend"
paths:
- ".*"
flag_regexes: # List of lags to be included in the component.
- "unit"
- "controller"
- "service"

codecov:
notify:
manual_trigger: true
notify_error: true
4 changes: 4 additions & 0 deletions resources/js/classes/person.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@
getStatus() {
return 'status';
}

getAnotherValue() {
return 'another value';
}
}

0 comments on commit 5f38ad0

Please sign in to comment.