Skip to content

Commit

Permalink
Adding build pipeline to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
payneBrandon committed Nov 8, 2024
1 parent decb60b commit d3c2b24
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: cv-manager

on: [pull_request, push]

jobs:
build_wzdx:
runs-on: ubuntu-latest
container:
image: python:3.12.2
options: --user root
steps:
- name: Checkout ${{ github.event.repository.name }}
uses: actions/checkout@v3

- name: Install Dependencies
run: |
apt-get update
apt-get -y install python3-coverage python3-pip python3-pytest
- name: Install Python Requirements
run: python3 -m pip install -r $GITHUB_WORKSPACE/requirements.txt

- name: Run Tests and Generate Coverage
continue-on-error: true
run: |
# Set PYTHONPATH and navigate to the tests directory
export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages
cd $GITHUB_WORKSPACE
# Run tests and generate coverage report
python3 -m coverage run -m pytest
python3 -m coverage xml --omit="/opt/*,/root/*,/tmp/*,/usr/*,/var/*,**/__init__.py"
- name: Archive Code Coverage Results
uses: actions/upload-artifact@v3
with:
name: build_api
path: cov.xml

0 comments on commit d3c2b24

Please sign in to comment.