|
name: Dependency packages |
|
|
|
on: |
|
push: |
|
branches: [main] |
|
pull_request: |
|
workflow_dispatch: |
|
|
|
permissions: |
|
contents: read |
|
|
|
jobs: |
|
test: |
|
runs-on: ${{ matrix.python-version == '3.7' && 'ubuntu-22.04' || 'ubuntu-latest' }} |
|
strategy: |
|
fail-fast: false |
|
matrix: |
|
project: [smmap, gitdb] |
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"] |
|
|
|
steps: |
|
- uses: actions/checkout@v7 |
|
with: |
|
fetch-depth: 0 |
|
- uses: actions/setup-python@v7 |
|
with: |
|
python-version: ${{ matrix.python-version }} |
|
allow-prereleases: true |
|
- name: Install test dependencies |
|
run: | |
|
python -m pip install --upgrade pip |
|
python -m pip install pytest flake8 ./smmap |
|
if test "${{ matrix.project }}" = gitdb; then python -m pip install ./gitdb; fi |
|
- name: Lint |
|
run: flake8 "${{ matrix.project }}/${{ matrix.project }}" --count --select=E9,F63,F7,F82 --show-source --statistics |
|
- name: Test |
|
run: | |
|
if test "${{ matrix.project }}" = gitdb; then |
|
GITDB_TEST_GIT_REPO_BASE="$(git rev-parse --git-common-dir)" pytest -o addopts= -v gitdb/gitdb/test |
|
else |
|
pytest -o addopts= -v smmap/smmap/test |
|
fi |