From 70cafe496a20d71dedc9b09ffe7c857af6806d5d Mon Sep 17 00:00:00 2001 From: Christophe Vauclair Date: Tue, 19 Apr 2022 14:27:31 -0400 Subject: [PATCH] Uncomment publish workflow --- .github/workflows/publish_pypi.yml | 4 +- .github/workflows/publish_pypi_test.yml | 68 ++++++++++++------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index cc7e292..1b9561f 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 with: - python-version: 3.10.1 + python-version: 3.10.4 - name: Install pipenv run: python -m pip install --upgrade pipenv wheel @@ -29,7 +29,7 @@ jobs: uses: actions/cache@v3 with: path: ~/.local/share/virtualenvs - key: ${{ runner.os }}-pipenv-3.10.1-${{ hashFiles('**/Pipfile.lock') }} + key: ${{ runner.os }}-pipenv-3.10.4-${{ hashFiles('**/Pipfile.lock') }} - name: Install dependencies if: steps.cache-pipenv.outputs.cache-hit != 'true' diff --git a/.github/workflows/publish_pypi_test.yml b/.github/workflows/publish_pypi_test.yml index 618d738..04d9ebc 100644 --- a/.github/workflows/publish_pypi_test.yml +++ b/.github/workflows/publish_pypi_test.yml @@ -35,9 +35,9 @@ jobs: - name: Run unit tests run: pipenv run nose2 - # - name: Run examples smoke tests - # shell: bash - # run: sh tests/test_examples.sh + - name: Run examples smoke tests + shell: bash + run: sh tests/test_examples.sh - name: Lint with flake8 run: | @@ -47,34 +47,34 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --indent-size=2 --statistics - # publish-pypi: - # needs: test - # runs-on: ubuntu-latest - - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v2 - # with: - # python-version: 3.10.1 - - # - name: Install pipenv - # run: python -m pip install --upgrade pipenv wheel - - # - id: cache-pipenv - # uses: actions/cache@v1 - # with: - # path: ~/.local/share/virtualenvs - # key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} - - # - name: Install dependencies - # if: steps.cache-pipenv.outputs.cache-hit != 'true' - # run: pipenv install --deploy --dev - - # - name: Build package - # run: pipenv run python -m build --sdist --wheel --outdir dist/ - - # - name: Publish distribution 📦 to Test PyPI - # uses: pypa/gh-action-pypi-publish@master - # with: - # password: ${{ secrets.TEST_PYPI_API_TOKEN }} - # repository_url: https://test.pypi.org/legacy/ + publish-pypi: + needs: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.10.1 + + - name: Install pipenv + run: python -m pip install --upgrade pipenv wheel + + - id: cache-pipenv + uses: actions/cache@v1 + with: + path: ~/.local/share/virtualenvs + key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }} + + - name: Install dependencies + if: steps.cache-pipenv.outputs.cache-hit != 'true' + run: pipenv install --deploy --dev + + - name: Build package + run: pipenv run python -m build --sdist --wheel --outdir dist/ + + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/