From 761f4f2dba23a1fb10610ae16270baa7bf12266d Mon Sep 17 00:00:00 2001 From: paugier Date: Sun, 27 Oct 2024 13:51:41 +0100 Subject: [PATCH] Try CI with Heptapod --- .github/workflows/unix.yml | 1 + .gitlab-ci.yml | 57 ++++++++++++++++++++++++++++++++++++++ README.md | 9 ++++-- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/unix.yml b/.github/workflows/unix.yml index e747304..132a618 100644 --- a/.github/workflows/unix.yml +++ b/.github/workflows/unix.yml @@ -48,6 +48,7 @@ jobs: . $HOME/.bashrc; fi hg version -v + hg debuginstall mkdir -p $HOME/tmp cd $HOME/tmp hg clone https://github.com/fluiddyn/conda-app.git diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2a2239a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,57 @@ +stages: + - test + - build + - release + +image: python:3.12 + +test-run: + stage: test + script: + - wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" + - bash Miniforge3-$(uname)-$(uname -m).sh -b + - ls ~/miniforge3 + - ~/miniforge3/bin/conda init bash + - . ~/.bashrc + - conda --version + - pip install . + - conda-app install mercurial + - conda env list + - . ~/.bashrc + - hg debuginstall + - mkdir -p $HOME/tmp + - cd $HOME/tmp + - hg clone https://github.com/fluiddyn/conda-app.git + - cd conda-app + - ls + +build-package: + stage: build + before_script: + - python -m pip install build twine + script: + - python -m build + - twine check dist/* + needs: [] + artifacts: + when: always + paths: + - dist + expire_in: 24 hrs + +# manually set TWINE_PASSWORD in web interface to your PyPI API token +release-package: + stage: release + needs: ["build-package", "test-run"] + rules: + - if: '$CI_MERGE_REQUEST_ID' + when: never + - if: '$CI_COMMIT_TAG' + when: on_success + variables: + TWINE_USERNAME: __token__ + before_script: + - pip install twine -U + script: + - ls dist/* + - twine upload dist/* diff --git a/README.md b/README.md index b0e1e82..b721407 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Conda-app [![PyPI][pypi-badge]][pypi-link] -[![Github Actions][GH-badge]][GH-link] +[![Github Actions][GH-badge-unix]][GH-link-unix] +[![Github Actions][GH-badge-windows]][GH-link-windows] ## Install isolated applications using conda @@ -52,5 +53,7 @@ $ conda-app uninstall pandoc [pypi-badge]: https://img.shields.io/pypi/v/conda-app.svg [pypi-link]: https://pypi.python.org/pypi/conda-app/ -[GH-badge]: https://github.com/fluiddyn/conda-app/actions/workflows/ci.yml/badge.svg?branch=branch/default -[GH-link]: https://github.com/fluiddyn/conda-app/actions +[GH-badge-unix]: https://github.com/fluiddyn/conda-app/actions/workflows/unix.yml/badge.svg?branch=branch/default +[GH-link-unix]: https://github.com/fluiddyn/conda-app/actions/workflows/unix.yml +[GH-badge-windows]: https://github.com/fluiddyn/conda-app/actions/workflows/windows.yml/badge.svg?branch=branch/default +[GH-link-windows]: https://github.com/fluiddyn/conda-app/actions/workflows/windows.yml