Skip to content

Commit

Permalink
chore: upgrade requests for poetry 1.2 (#107)
Browse files Browse the repository at this point in the history
* Update release.yml

* chore: update poetry actions to 2.1.6

* chore: update poetry to 1.2

* chore: upgrade requests for poetry 1.2

* chore: use 22.04 as test os

* test: add gnome-keyring for poetry install

* test: remove source venv
  • Loading branch information
sangshuduo authored Nov 10, 2022
1 parent b1aa55e commit 61ccad2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v1
Expand All @@ -18,5 +18,6 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
pip3 install --upgrade requests
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -26,14 +26,14 @@ jobs:
release:
name: GitHub Release
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build tools
run: |
sudo apt-get update
sudo apt-get update -y
sudo apt-get install -y build-essential cmake
- name: Setup Python
Expand All @@ -52,14 +52,17 @@ jobs:
uses: actions/[email protected]
with:
path: ~/.cache/pypoetry
key: ubuntu-20.04-poetry-${{ hashFiles('**/poetry.lock') }}
key: ubuntu-22.04-poetry-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: |
sudo apt install -y gnome-keyring
pip3 install --upgrade requests
poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Build tools
run: |
sudo apt-get update
sudo apt-get update -y
sudo apt-get install -y build-essential cmake
- name: Setup Python
Expand Down Expand Up @@ -51,13 +51,14 @@ jobs:
uses: actions/[email protected]
with:
path: ~/.poetry
key: ubuntu-20.04-poetry
key: ubuntu-22.04-poetry
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.2
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
Expand All @@ -76,7 +77,10 @@ jobs:
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: |
sudo apt install -y gnome-keyring
pip3 install --upgrade requests
poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
Expand All @@ -86,7 +90,7 @@ jobs:
- name: Test 2.x
run: |
export LD_LIBRARY_PATH=$PWD/TDengine_v2/build/build/lib
source $VENV
#source $VENV
export TDENGINE_URL=localhost:6041
poetry run pip install psutil pandas
poetry run pytest tests --cov-report term --cov-report html --cov-report xml --cov=taos --cov=taosrest tests
Expand Down Expand Up @@ -134,12 +138,12 @@ jobs:
- name: Test 3.0
run: |
export LD_LIBRARY_PATH=$PWD/TDengine_v3/build/build/lib
source $VENV
#source $VENV
export TDENGINE_URL=localhost:6041
curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" localhost:6041/rest/sql
poetry run pip install psutil pandas pytest-cov
poetry run pytest --cov-report term --cov-report html --cov-report xml --cov=taos --cov=taosrest --cov-append tests
- name: 'Upload taosd logs'
if: failure()
Expand Down

0 comments on commit 61ccad2

Please sign in to comment.