Skip to content

Commit

Permalink
Standardize and improve ci-release.yml (#531)
Browse files Browse the repository at this point in the history
* standardize name

* update concurency detection

* remove token for checkout

* add only run on NCAR/geocat-comp repo and only on main

* add pypi release to test

* turn off if check for testing

* add name to micromamba set up

* conda -> micromamba for windows

* turn back on if check

* add to release notes
  • Loading branch information
anissa111 authored Dec 27, 2023
1 parent 88363fb commit c2f90a3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
name: CI-release-test
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:
Expand All @@ -18,31 +23,29 @@ jobs:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
python-version: ["3.9", "3.10", "3.11"]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: checkout
uses: actions/checkout@v4
- name: environment set up
uses: mamba-org/setup-micromamba@v1
with:
token: ${{ github.token }}
- name: conda_setup
uses: conda-incubator/setup-miniconda@v3
with:
channel-priority: strict
python-version: ${{ matrix.python-version }}
channels: conda-forge
environment-name: import_test
create-args: >-
python=${{ matrix.python-version }}
- name: Install released geocat-comp
- name: Try conda release
run: |
conda create -n import_test geocat-comp
micromamba install geocat-comp
micromamba activate import_test
micromamba list
micromamba activate import_test
python -c "import geocat.comp"
- name: See environment info
- name: Uninstall conda release
run: |
conda activate import_test
conda list
micromamba remove geocat-comp -y
- name: Import
- name: Try PyPI release
run: |
conda activate import_test
pip install geocat-comp
micromamba list
python -c "import geocat.comp"
2 changes: 1 addition & 1 deletion docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Internal Changes
^^^^^^^^^^^^^^^^
* Upstream CI improvements by `Anissa Zacharias`_ in (:pr:`527`)
* CI improvements by `Anissa Zacharias`_ in (:pr:`528`)

* Improves/standardizes release tests and adds PyPI release testing by `Anissa Zacharias`_ in (:pr:`531`)

v2023.12.0 (December 5, 2023)
-----------------------------
Expand Down

0 comments on commit c2f90a3

Please sign in to comment.