ci: stablilize coverage tracking
This commit is contained in:
parent
21a45dab1c
commit
eab85fc291
4 changed files with 88 additions and 23 deletions
20
.github/workflows/server-mariadb-tests.yml
vendored
20
.github/workflows/server-mariadb-tests.yml
vendored
|
|
@ -129,10 +129,26 @@ jobs:
|
|||
|
||||
- name: Upload coverage data
|
||||
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-${{ matrix.container }}
|
||||
path: /home/runner/frappe-bench/sites/coverage.xml
|
||||
|
||||
coverage:
|
||||
name: Coverage Wrap Up
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Upload coverage data
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
name: MariaDB
|
||||
fail_ci_if_error: true
|
||||
files: /home/runner/frappe-bench/sites/coverage.xml
|
||||
verbose: true
|
||||
flags: server
|
||||
flags: server-mariadb
|
||||
|
|
|
|||
20
.github/workflows/server-postgres-tests.yml
vendored
20
.github/workflows/server-postgres-tests.yml
vendored
|
|
@ -132,10 +132,26 @@ jobs:
|
|||
|
||||
- name: Upload coverage data
|
||||
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: coverage-${{ matrix.container }}
|
||||
path: /home/runner/frappe-bench/sites/coverage.xml
|
||||
|
||||
coverage:
|
||||
name: Coverage Wrap Up
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Upload coverage data
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
name: Postgres
|
||||
fail_ci_if_error: true
|
||||
files: /home/runner/frappe-bench/sites/coverage.xml
|
||||
verbose: true
|
||||
flags: server
|
||||
flags: server-postgres
|
||||
|
|
|
|||
57
.github/workflows/ui-tests.yml
vendored
57
.github/workflows/ui-tests.yml
vendored
|
|
@ -21,7 +21,8 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
containers: [1, 2, 3]
|
||||
# Make sure you modify coverage submission file list if changing this
|
||||
container: [1, 2, 3]
|
||||
|
||||
name: UI Tests (Cypress)
|
||||
|
||||
|
|
@ -160,26 +161,50 @@ jobs:
|
|||
with:
|
||||
files: "/home/runner/frappe-bench/apps/frappe/.cypress-coverage/clover.xml"
|
||||
|
||||
- name: Upload Coverage Data
|
||||
- name: Upload JS coverage data
|
||||
if: ${{ steps.check-build.outputs.build == 'strawberry' && steps.check_coverage.outputs.files_exists == 'true' }}
|
||||
uses: codecov/codecov-action@v3
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Cypress
|
||||
fail_ci_if_error: true
|
||||
directory: /home/runner/frappe-bench/apps/frappe/.cypress-coverage/
|
||||
verbose: true
|
||||
flags: ui-tests
|
||||
name: coverage-js-${{ matrix.container }}
|
||||
path: /home/runner/frappe-bench/apps/frappe/.cypress-coverage/clover.xml
|
||||
|
||||
- name: Upload Server Coverage Data
|
||||
if: ${{ steps.check-build.outputs.build-server == 'strawberry' }}
|
||||
uses: codecov/codecov-action@v3
|
||||
- name: Upload python coverage data
|
||||
if: ${{ steps.check-build.outputs.build == 'strawberry' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: MariaDB
|
||||
fail_ci_if_error: true
|
||||
files: /home/runner/frappe-bench/sites/coverage.xml
|
||||
verbose: true
|
||||
flags: server
|
||||
name: coverage-py-${{ matrix.container }}
|
||||
path: /home/runner/frappe-bench/sites/coverage.xml
|
||||
|
||||
- name: Show bench console if tests failed
|
||||
if: ${{ failure() }}
|
||||
run: cat ~/frappe-bench/bench_start.log
|
||||
|
||||
|
||||
coverage:
|
||||
name: Coverage Wrap Up
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
||||
- name: Upload python coverage data
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
name: MariaDB
|
||||
fail_ci_if_error: true
|
||||
verbose: true
|
||||
files: ./coverage-py-1/coverage.xml,./coverage-py-2/coverage.xml,./coverage-py-3/coverage.xml
|
||||
flags: server-ui
|
||||
|
||||
- name: Upload JS coverage data
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
name: Cypress
|
||||
fail_ci_if_error: true
|
||||
files: ./coverage-js-1/clover.xml,./coverage-js-2/clover.xml,./coverage-js-3/clover.xml
|
||||
verbose: true
|
||||
flags: ui-tests
|
||||
|
|
|
|||
14
codecov.yml
14
codecov.yml
|
|
@ -25,11 +25,19 @@ comment:
|
|||
require_changes: true
|
||||
|
||||
flags:
|
||||
server:
|
||||
server-mariadb:
|
||||
paths:
|
||||
- ".*\\.py"
|
||||
- "**/*.py"
|
||||
carryforward: true
|
||||
server-postgres:
|
||||
paths:
|
||||
- "**/*.py"
|
||||
carryforward: true
|
||||
ui-tests:
|
||||
paths:
|
||||
- ".*\\.js"
|
||||
- "**/*.js"
|
||||
carryforward: true
|
||||
server-ui:
|
||||
paths:
|
||||
- "**/*.py"
|
||||
carryforward: true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue