Skip to content

CI Release Test

CI Release Test #682

Workflow file for this run

name: CI Release Test
on:
schedule:
- cron: '0 0 * * *' # Daily “At 00:00”
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test_conda_release:
if: github.repository == 'NCAR/geocat-comp' && github.ref == 'refs/heads/main'
name: Conda python${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: checkout
uses: actions/checkout@v4
- name: environment set up
id: env-setup
continue-on-error: true
uses: mamba-org/setup-micromamba@v1
with:
environment-name: import_test
create-args: >-
python=${{ matrix.python-version }}
cache-environment: true
cache-environment-key: "release_test-${{runner.os}}-py${{matrix.python-version}}-${{steps.date.outputs.date}}"
- name: retry environment setup if failed
if: steps.env-setup.outcome == 'failure'
uses: mamba-org/setup-micromamba@v1
with:
download-micromamba: false
environment-name: import_test
create-args: >-
python=${{ matrix.python-version }}
cache-environment: true
cache-environment-key: "release_test-${{runner.os}}-py${{matrix.python-version}}-${{steps.date.outputs.date}}"
- name: Try conda release
run: |
micromamba install geocat-comp
micromamba activate import_test
micromamba list
micromamba activate import_test
python -c "import geocat.comp"
test_pypi_release:
if: github.repository == 'NCAR/geocat-comp' && github.ref == 'refs/heads/main'
name: PyPI python${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: environment set up
id: env-setup
continue-on-error: true
uses: mamba-org/setup-micromamba@v1
with:
environment-name: import_test
create-args: >-
python=${{ matrix.python-version }}
cache-environment: true
cache-environment-key: "release_test-${{runner.os}}-py${{matrix.python-version}}-${{steps.date.outputs.date}}"
- name: retry environment setup if failed
if: steps.env-setup.outcome == 'failure'
uses: mamba-org/setup-micromamba@v1
with:
download-micromamba: false
environment-name: import_test
create-args: >-
python=${{ matrix.python-version }}
cache-environment: true
cache-environment-key: "release_test-${{runner.os}}-py${{matrix.python-version}}-${{steps.date.outputs.date}}"
- name: Try PyPI release
run: |
pip install geocat-comp
micromamba list
python -c "import geocat.comp"