-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize and improve ci-release.yml (#531)
* 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
Showing
2 changed files
with
23 additions
and
20 deletions.
There are no files selected for viewing
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
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: | ||
|
@@ -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" |
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