66
77jobs :
88 smoke-test :
9- runs-on : ${{ matrix.os }}
9+ runs-on : ubuntu-latest
1010 strategy :
1111 matrix :
12- os : [ubuntu-latest]
1312 python-version : ["3.12"]
14- poetry-version : ["1.8.2"]
1513 fail-fast : false
1614
1715 steps :
@@ -23,17 +21,25 @@ jobs:
2321 with :
2422 python-version : ${{ matrix.python-version }}
2523
26- - name : Run image
27- uses : abatilo/actions-poetry@v2.0.0
24+ - name : Install the latest version of rye
25+ uses : eifinger/setup-rye@v4
26+ id : setup-rye
2827 with :
29- poetry-version : ${{ matrix.poetry-version }}
28+ enable-cache : true
29+ cache-prefix : ${{ matrix.python-version }}
30+
31+ - name : Pin python-version ${{ matrix.python-version }}
32+ run : rye pin ${{ matrix.python-version }}
33+
3034 - name : Install dependencies
31- run : poetry install --with dev
35+ if : steps.setup-rye.outputs.cache-hit != 'true'
36+ run : |
37+ rye sync --no-lock
3238
3339 - name : Run tests
3440 env :
3541 MAG_API_KEY : ${{ secrets.MAG_API_KEY }}
36- run : poetry run pytest -vs smoke/test_smoke.py
42+ run : rye run pytest -vs smoke/test_smoke.py
3743
3844 # - name: Upload coverage to Codecov
3945 # uses: codecov/codecov-action@v1
@@ -45,21 +51,23 @@ jobs:
4551 fail-fast : false
4652 matrix :
4753 python-version : [3.11]
48- poetry-version : [1.8.2]
49- os : [ubuntu-latest]
50- runs-on : ${{ matrix.os }}
54+ runs-on : ubuntu-latest
5155 steps :
5256 - uses : actions/checkout@v2
5357 - uses : actions/setup-python@v2
5458 with :
5559 python-version : ${{ matrix.python-version }}
56- - name : Run image
57- uses : abatilo/actions-poetry@v2.0.0
60+
61+ - name : Install the latest version of rye
62+ uses : eifinger/setup-rye@v4
63+ id : setup-rye
5864 with :
59- poetry-version : ${{ matrix.poetry-version }}
60- - name : Publish
65+ enable-cache : true
66+ cache-prefix : ${{ matrix.python-version }}
67+
68+ - name : Publish To PyPi
6169 env :
6270 PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
6371 run : |
64- poetry config pypi-token.pypi $PYPI_TOKEN
65- poetry publish --build
72+ rye build
73+ rye publish --yes --token $PYPI_TOKEN
0 commit comments