Skip to content

Commit

Permalink
Merge pull request #1507 from Sage-Bionetworks/develop-fix-gh-workflow
Browse files Browse the repository at this point in the history
Fix: remove caching poetry dependencies in CI workfows
  • Loading branch information
linglp authored Sep 21, 2024
2 parents 21aa2b8 + 8dcc572 commit 1e39a05
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 38 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/api_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,11 @@ jobs:
| python3 - --version ${{ env.POETRY_VERSION }};
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
- name: Install dependencies and root project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras

#----------------------------------------------
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/pdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,10 @@ jobs:
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ env.PYTHON_VERSION }}

#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
- name: Install dependencies and root project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras

# create documentation
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,10 @@ jobs:
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}

#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
- name: Install dependencies and root project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --all-extras

#----------------------------------------------
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
| python3 - --version ${{ env.POETRY_VERSION }};
poetry config virtualenvs.create true;
poetry config virtualenvs.in-project true;
#----------------------------------------------
# install dependencies and root project
#----------------------------------------------
Expand Down Expand Up @@ -120,9 +121,8 @@ jobs:
SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }}
SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }}
run: >
source .venv/bin/activate;
pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov
--cov-report=xml:coverage.xml --cov=schematic/ --reruns 4 -n 8 tests/unit
poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov
--cov-report=xml:coverage.xml --cov=schematic/ --reruns 4 -n 8 tests/unit;
#----------------------------------------------
# run integration test suite
Expand All @@ -133,8 +133,7 @@ jobs:
SYNAPSE_ACCESS_TOKEN: ${{ secrets.SYNAPSE_ACCESS_TOKEN }}
SERVICE_ACCOUNT_CREDS: ${{ secrets.SERVICE_ACCOUNT_CREDS }}
run: >
source .venv/bin/activate;
pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/
poetry run pytest --durations=0 --cov-append --cov-report=term --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov=schematic/
-m "not (rule_benchmark)" --reruns 4 -n 8 --ignore=tests/unit
Expand Down

0 comments on commit 1e39a05

Please sign in to comment.