CI Release Test #520
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
if: github.repository == 'NCAR/geocat-comp' && github.ref == 'refs/heads/main' | |
name: 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.9", "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 }} | |
- 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 }} | |
- name: Try conda release | |
run: | | |
micromamba install geocat-comp | |
micromamba activate import_test | |
micromamba list | |
micromamba activate import_test | |
python -c "import geocat.comp" | |
- name: Uninstall conda release | |
run: | | |
micromamba remove geocat-comp -y | |
- name: Try PyPI release | |
run: | | |
pip install geocat-comp | |
micromamba list | |
python -c "import geocat.comp" |