Skip to content

Solve #28 reading from log files #89

Solve #28 reading from log files

Solve #28 reading from log files #89

Workflow file for this run

name: test_coverage
permissions:
pull-requests: write
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_test_linux:
name: ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.11"]
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup py-${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# Caching improves build time, we use pythonLocation to cache everything including wheels to avoid building
# wheels at each build (pandas/Pypy is extremely time consuming)
# sed replacement is performed to rectify PyPy path which ends with /bin
# cache key takes into account the Python version of the runner to avoid version mismatch on updates.
- name: Get pip cache path
id: get-pip-path
run: |
id=$(echo ${{ env.pythonLocation }} | sed 's/\/bin//g')
echo "name=id::$id" >> $GITHUB_OUTPUT
- name: Pip cache
uses: actions/cache@v3
id: pip-cache
with:
path: ${{ steps.get-pip-path.outputs.id }}
key: ${{ steps.get-pip-path.outputs.id }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements/requirements-dev.txt') }}-${{ hashFiles('requirements/requirements-logcollector.txt') }}-${{ hashFiles('requirements/requirements-detector.txt') }}-${{ hashFiles('requirements/requirements-prefilter.txt') }}-${{ hashFiles('requirements/requirements-inspector.txt') }}
- name: Install requirements
if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/requirements-dev.txt -r requirements/requirements.detector.txt -r requirements/requirements.logcollector.txt -r requirements/requirements.prefilter.txt -r requirements/requirements.inspector.txt
- name: Test
run: |
python -m coverage run -m unittest
python -m coverage xml
- name: Get Coverage
uses: orgoro/coverage@v3.2
with:
coverageFile: ./coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}