From 9f0c6b5a9317c4923f064ec0c5134a6b82378be5 Mon Sep 17 00:00:00 2001 From: Jacob Filik Date: Tue, 8 Jun 2021 21:42:42 +0100 Subject: [PATCH 1/2] add testpypi to ci --- .github/workflows/ci.yml | 11 +++++++---- pyproject.toml | 6 ++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a3a989..038c60e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,16 +16,13 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python-version }} + python-version: 3.8 - name: Install dependencies run: | python -m pip install --upgrade pip @@ -33,6 +30,7 @@ jobs: pip install numpy pip install h5py pip install dask + pip install build if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | @@ -43,3 +41,8 @@ jobs: - name: Test with pytest run: | python3 -m pytest --cov=swmr_tools + - name: publish to TestPyPI + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..374b58c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" From 98d572c90533ab1ab3a50a81510284117f646810 Mon Sep 17 00:00:00 2001 From: Jacob Filik Date: Tue, 8 Jun 2021 21:48:07 +0100 Subject: [PATCH 2/2] include build step... --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 038c60e..fa65e51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,13 @@ jobs: - name: Test with pytest run: | python3 -m pytest --cov=swmr_tools + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ - name: publish to TestPyPI uses: pypa/gh-action-pypi-publish@master with: