-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GHA workflow to run check_datasets_xml on push
- Loading branch information
1 parent
b4cd13f
commit 48ba1f3
Showing
2 changed files
with
59 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: check-datasets-xml | ||
|
||
on: | ||
push: | ||
branches: [ '*' ] | ||
# Enable workflow to be triggered from GitHub CLI, browser, or via API | ||
# primarily for testing conda env solution for new Python versions | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-datasets-xml: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ '3.12' ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Conda environment with Micromamba | ||
uses: mamba-org/setup-micromamba@54d4d5980e1a4aa7cdc8b050cf2d19b7e262ce18 | ||
with: | ||
environment-file: envs/environment-test.yaml | ||
environment-name: erddap-datasets-test | ||
cache-environment: true | ||
cache-downloads: true | ||
# persist downloads cache for 1 day | ||
cache-downloads-key: downloads-${{ steps.date.outputs.date }} | ||
create-args: >- | ||
python=${{ inputs.python-version }} | ||
- name: Run check_datasets_xml.py | ||
run: python check_datasets_xml.py |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# conda environment description file for Serddap-datasets testing environment | ||
# | ||
# Creates a conda environment in which the check_datasets_xml module can be run. | ||
# Primarily intended for creation of a conda env for use in a GitHub Actions workflow. | ||
|
||
name: erddap-datasets-test | ||
|
||
channels: | ||
- conda-forge | ||
- nodefaults | ||
|
||
dependencies: | ||
- bottleneck | ||
- jupyterlab | ||
- lxml | ||
- netcdf4 | ||
- pip | ||
- python=3.12 | ||
- pyyaml | ||
- rich | ||
- structlog | ||
- xarray |