93
.github/workflows/code-coverage-report.yaml
vendored
93
.github/workflows/code-coverage-report.yaml
vendored
@ -1,93 +0,0 @@
|
||||
---
|
||||
|
||||
name: 'Process Coverage Artifact'
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- 'Unit Test'
|
||||
types:
|
||||
- completed
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
checks: write
|
||||
|
||||
|
||||
jobs:
|
||||
report:
|
||||
runs-on: ubuntu-latest
|
||||
# strategy:
|
||||
# max-parallel: 4
|
||||
# matrix:
|
||||
# python-version: ['3.12']
|
||||
name: Coverage
|
||||
steps:
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
ls -l;
|
||||
|
||||
- name: Download Coverage Artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: coverage-report-3.12
|
||||
# path: coverage.xml
|
||||
run-id: ${{ github.event.workflow_run.id }}
|
||||
github-token: ${{ github.token }}
|
||||
|
||||
- name: ls
|
||||
if: success() || failure()
|
||||
run: |
|
||||
ls -l;
|
||||
|
||||
- name: Code Coverage Report
|
||||
uses: irongut/CodeCoverageSummary@v1.3.0
|
||||
with:
|
||||
filename: coverage.xml
|
||||
badge: true
|
||||
fail_below_min: true
|
||||
format: markdown
|
||||
hide_branch_rate: false
|
||||
hide_complexity: false
|
||||
indicators: true
|
||||
output: both
|
||||
thresholds: '60 85'
|
||||
|
||||
|
||||
# - name: Add Coverage PR Comment
|
||||
# uses: marocchino/sticky-pull-request-comment@v2
|
||||
# if: github.event_name == 'pull_request'
|
||||
# with:
|
||||
# recreate: true
|
||||
# path: code-coverage-results.md
|
||||
|
||||
|
||||
- name: ls
|
||||
if: success() || failure()
|
||||
run: |
|
||||
ls -l;
|
||||
|
||||
# - name: Adding markdown
|
||||
# run: |
|
||||
# cat $(ls *.md | tail -1) >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: create status check/comment for code coverage results
|
||||
id: jest_coverage_check
|
||||
uses: im-open/process-code-coverage-summary@v2.3.0
|
||||
with:
|
||||
# github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github-token: ${{ github.token }}
|
||||
summary-file: code-coverage-results.md
|
||||
create-pr-comment: true
|
||||
update-comment-if-one-exists: true
|
||||
update-comment-key: "${{ env.GITHUB-JOB }}_${{ env.GITHUB-ACTION }}"
|
||||
|
||||
- name: Upload Coverage Summary
|
||||
uses: actions/upload-artifact@v4
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: code-coverage-results-3.12
|
||||
path: code-coverage-results.md
|
35
.github/workflows/unit-test-report.yaml
vendored
35
.github/workflows/unit-test-report.yaml
vendored
@ -1,35 +0,0 @@
|
||||
---
|
||||
|
||||
name: 'Process Unit Test Artifact'
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- 'Unit Test'
|
||||
types:
|
||||
- completed
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
checks: write
|
||||
|
||||
|
||||
jobs:
|
||||
report:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
python-version: ['3.10', '3.11', '3.12']
|
||||
steps:
|
||||
|
||||
- name: Test Report
|
||||
uses: dorny/test-reporter@v1
|
||||
with:
|
||||
artifact: unit-test-results-${{ matrix.python-version }}
|
||||
badge-title: 'Unit Tests [Python ${{ matrix.python-version }}]'
|
||||
name: Unit Test Report [Python ${{ matrix.python-version }}]
|
||||
path: '*.xml'
|
||||
reporter: java-junit
|
128
.github/workflows/unit-test.yaml
vendored
128
.github/workflows/unit-test.yaml
vendored
@ -1,128 +0,0 @@
|
||||
name: 'Unit Test'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "development"
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
branches:
|
||||
- "development"
|
||||
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
python-version: ['3.10', '3.11', '3.12']
|
||||
|
||||
steps:
|
||||
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements_test.txt
|
||||
|
||||
|
||||
- name: Run Tests
|
||||
run: |
|
||||
cd app;
|
||||
pytest --cov --cov-report term --cov-report xml:../coverage.xml --cov-report html:../coverage/ --junit-xml=../unit.JUnit.xml **/tests/unit;
|
||||
|
||||
|
||||
- name: Upload Test Report
|
||||
uses: actions/upload-artifact@v4
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: unit-test-results-${{ matrix.python-version }}
|
||||
path: unit.JUnit.xml
|
||||
|
||||
|
||||
- name: Upload Coverage Report
|
||||
uses: actions/upload-artifact@v4
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: coverage-report-${{ matrix.python-version }}
|
||||
path: coverage.xml
|
||||
|
||||
|
||||
- name: Upload Coverage
|
||||
uses: actions/upload-artifact@v4
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: coverage-${{ matrix.python-version }}
|
||||
path: coverage/*
|
||||
|
||||
# coverage:
|
||||
# needs:
|
||||
# - test
|
||||
# runs-on: ubuntu-latest
|
||||
# # strategy:
|
||||
# # max-parallel: 4
|
||||
# # matrix:
|
||||
# # python-version: ['3.12']
|
||||
# name: Coverage
|
||||
# steps:
|
||||
|
||||
# # - name: Run Tests
|
||||
# # run: |
|
||||
# # ls -l;
|
||||
|
||||
# - name: Download Coverage Artifact
|
||||
# uses: actions/download-artifact@v4
|
||||
# with:
|
||||
# name: coverage-report-3.12
|
||||
# # path: coverage.xml
|
||||
# # run-id: ${{ github.event.workflow_run.id }}
|
||||
# # github-token: ${{ github.token }}
|
||||
|
||||
|
||||
# - name: Add Coverage PR Comment
|
||||
# uses: marocchino/sticky-pull-request-comment@v2
|
||||
# if: github.event_name == 'pull_request'
|
||||
# with:
|
||||
# recreate: true
|
||||
# path: code-coverage-results.md
|
||||
|
||||
|
||||
# - name: ls
|
||||
# if: success() || failure()
|
||||
# run: |
|
||||
# ls -l;
|
||||
|
||||
# - name: Code Coverage Report
|
||||
# uses: irongut/CodeCoverageSummary@v1.3.0
|
||||
# with:
|
||||
# filename: coverage.xml
|
||||
# badge: true
|
||||
# fail_below_min: true
|
||||
# format: markdown
|
||||
# hide_branch_rate: false
|
||||
# hide_complexity: false
|
||||
# indicators: true
|
||||
# output: both
|
||||
# thresholds: '60 85'
|
||||
|
||||
# - name: ls
|
||||
# if: success() || failure()
|
||||
# run: |
|
||||
# ls -l;
|
||||
|
||||
# - name: Summary
|
||||
# run: |
|
||||
# cat $(ls *.md | tail -1) >> $GITHUB_STEP_SUMMARY
|
Reference in New Issue
Block a user