From fcaf9a1ec625a6322e02f4751c317e7416fef3c2 Mon Sep 17 00:00:00 2001 From: TheBurchLog <5104941+TheBurchLog@users.noreply.github.com> Date: Mon, 4 Mar 2024 06:16:51 -0500 Subject: [PATCH] Create develop_push.yml (#457) --- .github/workflows/develop_push.yml | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/develop_push.yml diff --git a/.github/workflows/develop_push.yml b/.github/workflows/develop_push.yml new file mode 100644 index 00000000..e9f52ecf --- /dev/null +++ b/.github/workflows/develop_push.yml @@ -0,0 +1,55 @@ +name: Develop Push + +on: + push: + branches: + - develop + +jobs: + + CodeCoverage: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + python-version: ['3.12'] + os: ['ubuntu-latest'] + + env: + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python-version }} + + name: Code Coverage OS ${{ matrix.os }} - Python ${{ matrix.python-version }} + steps: + - uses: actions/checkout@v2 + + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + # Need to update if we support other OS's + - name: Cache PIP Install + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-${{ matrix.python-version }}-pip-coverage-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-${{ matrix.python-version }}-pip-coverage + + - name: Make Deps + run: | + make deps + pip install pytest + pip install pytest-cov + + - name: Generate coverage report + continue-on-error: true + run: | + coverage run --source brewtils -m pytest test --tb=no + coverage report -m + coverage xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1