diff --git a/.github/workflows/pycompadre_sdist.yml b/.github/workflows/pycompadre_sdist.yml index 526563f67..d1ed628d1 100644 --- a/.github/workflows/pycompadre_sdist.yml +++ b/.github/workflows/pycompadre_sdist.yml @@ -66,12 +66,12 @@ jobs: - name: Test pycompadre using .test() run: | - cd ${{github.workspace}} + cd ${{github.workspace}}/pycompadre/examples python3 -c "import pycompadre; pycompadre.test()" 2>&1 | tee tests.log - name: Test unique install using .is_unique_installation() run: | - cd ${{github.workspace}} + cd ${{github.workspace}}/pycompadre/examples python3 -c "import pycompadre; pycompadre.is_unique_installation()" 2>&1 | tee tests.log - uses: actions/upload-artifact@v4 @@ -88,9 +88,9 @@ jobs: pycompadre-type: [ 'pycompadre',] environment: name: pypi - url: https://pypi.org/p/ # Replace with your PyPI project name + url: https://pypi.org/p/pycompadre permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing + id-token: write steps: - name: Download all the dists uses: actions/download-artifact@v4 @@ -99,20 +99,3 @@ jobs: path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - ## https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ - #- name: Publish distribution 📦 to Test PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.TEST_PIP_PYCOMPADRE_SECRET }} - # repository_url: https://test.pypi.org/legacy/ - # https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ - #- name: Publish distribution 📦 to PyPI (parallel) - # if: ${{ matrix.pycompadre-type == 'pycompadre' }} - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.PIP_PYCOMPADRE_SECRET }} - #- name: Publish distribution 📦 to PyPI (serial) - # if: ${{ matrix.pycompadre-type == 'pycompadre-serial' }} - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.PIP_PYCOMPADRE_SERIAL_SECRET }} diff --git a/.github/workflows/pycompadre_sdist_serial.yml b/.github/workflows/pycompadre_sdist_serial.yml deleted file mode 100644 index a765bedc0..000000000 --- a/.github/workflows/pycompadre_sdist_serial.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: pycompadre SDIST serial (Build/Upload) - -on: - workflow_dispatch: - inputs: - branch: - description: 'branch' - required: true - default: 'master' - publish: - description: 'Publish to PyPi? (y/n)' - required: true - default: 'n' - -jobs: - build: - name: Build SDIST ${{ matrix.pycompadre-type }} - runs-on: ubuntu-latest - strategy: - matrix: - pycompadre-type: [ 'pycompadre-serial',] - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.event.inputs.branch }} - - - name: Setup python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - architecture: x64 - - - name: Install Python dependencies - run: | - python3 -m pip install --upgrade pip - pip install numpy build - - - name: Generate Python package (parallel) - if: ${{ matrix.pycompadre-type == 'pycompadre' }} - run: | - cd ${{github.workspace}}/pycompadre - echo "./install.sh -p" - ./install.sh -p - - name: Generate Python package (serial) - if: ${{ matrix.pycompadre-type == 'pycompadre-serial' }} - run: | - cd ${{github.workspace}}/pycompadre - echo "./install.sh -p -s" - ./install.sh -p -s - - - uses: actions/upload-artifact@v4 - with: - name: ${{matrix.pycompadre-type}}.tar.gz - path: ${{github.workspace}}/dist/*.tar.gz - - - name: Install pycompadre from test repo - run: | - cd ${{github.workspace}}/dist/ - python3 -m pip -v -v -v install --no-cache `ls pycompadre*.gz` - cd ${{github.workspace}} - - - name: Test pycompadre using unittests - run: | - cd ${{github.workspace}}/pycompadre/examples - python3 -m unittest - - - name: Test pycompadre using .test() - run: | - cd ${{github.workspace}} - python3 -c "import pycompadre; pycompadre.test()" 2>&1 | tee tests.log - - - name: Test unique install using .is_unique_installation() - run: | - cd ${{github.workspace}} - python3 -c "import pycompadre; pycompadre.is_unique_installation()" 2>&1 | tee tests.log - - - uses: actions/upload-artifact@v4 - with: - name: tests-${{matrix.pycompadre-type}}.log - path: ${{github.workspace}}/tests.log - - upload: - runs-on: ubuntu-latest - needs: build - if: ${{ github.event.inputs.publish == 'y'}} - strategy: - matrix: - pycompadre-type: [ 'pycompadre-serial',] - environment: - name: pypi - url: https://pypi.org/p/${{matrix.pycompadre-type}} # Replace with your PyPI project name - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: ${{matrix.pycompadre-type}}.tar.gz - path: dist/ - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - # if: ${{ matrix.pycompadre-type == 'pycompadre-serial' }} - # uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # password: ${{ secrets.PIP_PYCOMPADRE_SERIAL_SECRET }}