Skip to content

ci.yaml updated to use python #1

ci.yaml updated to use python

ci.yaml updated to use python #1

Workflow file for this run

name: CI - Testing and Code Coverage

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 25, Col: 13): Matrix exclude key 'node-version' does not match any key within the matrix
on:
workflow_dispatch:
workflow_call:
outputs:
test-result:
description: "Test execution result"
value: ${{ jobs.code-coverage.outputs.result }}
env:
MONGO_URI: ${{ secrets.MONGO_URI }}
MONGO_USERNAME: ${{ secrets.MONGO_USERNAME }}
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
jobs:
unit-testing:
name: Unit Testing
strategy:
matrix:
python-version: [3.9, 3.10, 3.11]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- os: windows-latest
node-version: 3.9
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- name: Setup Puthon Version - ${{ 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 pytest pytest-cov
- name: Unit Testing
id: Python-unit-testing-step
run: pytest --junitxml=test-results.xml
- name: Archive Test Result
if: always()
uses: actions/upload-artifact@v4
with:
name: Mocha-Test-Result-${{ matrix.os }}-${{ matrix.python-version }}
path: test-results.xml
retention-days: 1
code-coverage:
name: Code Coverage
needs: unit-testing
runs-on: ubuntu-latest
outputs:
result: ${{ steps.coverage.outcome }}
steps:
- name: Checkout Repository
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
- name: Run Code Coverage
id: coverage
continue-on-error: true
run: pytest --cov=. --cov-report=xml --cov-report=html
- name: Archive Coverage Report
if: always()
uses: actions/upload-artifact@v4
with:
name: Coverage-Report
path: coverage/
retention-days: 1