install.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: Test installation
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. # * is a special character in YAML so you have to quote this string
  6. - cron: '0 0 * * 3'
  7. jobs:
  8. test-pypi-install:
  9. name: Test PyPI install (${{ matrix.python-version }}, ${{ matrix.os }})
  10. runs-on: "${{ matrix.os }}"
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. os: ["ubuntu-latest", "macos-latest", "windows-latest"]
  15. python-version: [ "3.9", "3.10", "3.11" ]
  16. steps:
  17. - name: Set up Python "${{ matrix.python-version }}"
  18. id: setup-python
  19. uses: actions/setup-python@v4
  20. with:
  21. python-version: "${{ matrix.python-version }}"
  22. - name: Install
  23. run: |
  24. pip install --upgrade pip
  25. pip install unfccc-ghg-data
  26. - name: Checkout repository
  27. uses: actions/checkout@v3
  28. - name: Test installation
  29. run: |
  30. which python
  31. python scripts/test-install.py
  32. test-micromamba-installation:
  33. name: Test (micro)mamba install (${{ matrix.python-version }}, ${{ matrix.os }})
  34. runs-on: "${{ matrix.os }}"
  35. strategy:
  36. fail-fast: false
  37. matrix:
  38. os: ["ubuntu-latest", "macos-latest", "windows-latest"]
  39. python-version: [ "3.9", "3.10", "3.11" ]
  40. steps:
  41. - name: Setup (micro)mamba and install package
  42. uses: mamba-org/setup-micromamba@v1
  43. with:
  44. environment-name: test-mamba-install
  45. create-args: >-
  46. python=${{ matrix.python-version }}
  47. -c conda-forge
  48. unfccc-ghg-data
  49. init-shell: bash
  50. - name: Checkout repository
  51. uses: actions/checkout@v3
  52. - name: Test installation
  53. shell: bash -leo pipefail {0}
  54. run: |
  55. which python
  56. python scripts/test-install.py