Skip to content

Commit

Permalink
Merge pull request #278 from michaelfeil/ci-simplify
Browse files Browse the repository at this point in the history
simplify-ci
  • Loading branch information
michaelfeil authored Jun 22, 2024
2 parents 473832b + 3e85c64 commit 76901c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ jobs:
run: |
poetry install --extras "all" --with test,lint,codespell
# - name: Install infinity_emb editable
# working-directory: ${{ inputs.working-directory }}
# if: ${{ inputs.working-directory != 'libs/infinity_emb' }}
# run: |
# pip install -e ../infinity_emb

- name: Get .mypy_cache to speed up mypy
uses: actions/cache@v4
env:
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
- "3.11"
- "3.12"
coverage_tests: ["unit_test", "end_to_end"]
source: ["local", "pypi"]
exclude:
# Exclude unit tests on macOS due to compatibility issues
- python-version: "3.9"
Expand All @@ -50,7 +49,7 @@ jobs:


runs-on: ${{ matrix.os }}
name: Py${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.coverage_tests }}-${{ matrix.source }}
name: Py${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.coverage_tests }}
steps:
- name: Free Disk Space
uses: jlumbroso/[email protected]
Expand All @@ -72,25 +71,23 @@ jobs:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: infinity-emb-test-${{ matrix.coverage_tests }}-${{ matrix.source }}
cache-key: ${{ inputs.working-directory }}-test-${{ matrix.coverage_tests }}

- name: Install dependencies from local
# only if source is local
if: matrix.source == 'local'
shell: bash
run: poetry install --extras all --with test

- name: Install from PyPI
# only if source is pypi
if: matrix.source == 'pypi'
run: |
poetry install --only test
poetry run pip install infinity-emb[all] --upgrade

- name: Run Pytest Coverage
if: ${{ inputs.working-directory == 'libs/infinity_emb' }}
run: |
poetry run coverage run -m --source ./infinity_emb pytest tests/${{ matrix.coverage_tests }}
poetry run coverage xml
- name: Run Pytest Coverage w/o infinity
if: ${{ inputs.working-directory != 'libs/infinity_emb' }}
run:
make coverage

- name: Upload coverage Report to Codecov for python 3.11
if: ${{ matrix.python-version == '3.11' && inputs.upload_coverage == true && matrix.os == 'ubuntu-latest'}}
Expand Down

0 comments on commit 76901c1

Please sign in to comment.