Skip to content

feat: Add LinkedIn folder-based data archive import support #261

feat: Add LinkedIn folder-based data archive import support

feat: Add LinkedIn folder-based data archive import support #261

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e ".[dev,ai]"
- name: Run tests with coverage
run: |
pytest --cov=cli --cov=api --cov-report=xml --cov-report=term-missing
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
fail_ci_if_error: false
coverage-check:
name: Coverage Check
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e ".[dev,ai]"
- name: Run tests with coverage
run: |
pytest --cov=cli --cov=api --cov-report=xml --cov-report=term --cov-report=json
- name: Check coverage threshold
run: |
COVERAGE=$(python -c "import json; print(json.load(open('coverage.json')).get('totals', {}).get('percent_covered', 0))")
echo "Current coverage: $COVERAGE%"
THRESHOLD=45
if (( $(echo "$COVERAGE < $THRESHOLD" | bc -l) )); then
echo "⚠️ Coverage ($COVERAGE%) is below threshold ($THRESHOLD%)"
echo "Consider adding tests to improve coverage"
exit 1
else
echo "✅ Coverage ($COVERAGE%) meets threshold ($THRESHOLD%)"
fi