-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from michaelfeil/ci-simplify
simplify-ci
- Loading branch information
Showing
2 changed files
with
8 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
@@ -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] | ||
|
@@ -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'}} | ||
|