-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from pangeo-forge/integration-test
Drop custom base image, add integration tests, install runner from release
- Loading branch information
Showing
5 changed files
with
84 additions
and
23 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,55 @@ | ||
name: Test action | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
jobs: | ||
test: | ||
name: (recipes@${{ matrix.recipes-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
recipes-version: ["0.10.3"] # , "main"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Clone test feedstock" | ||
# Fetches test feedstock (containing example test recipes) from pangeo-forge-recipes | ||
run: | | ||
git clone --depth 1 --branch ${{ matrix.recipes-version }} https://github.com/pangeo-forge/pangeo-forge-recipes.git | ||
- name: "Add requirements.txt" | ||
# The clone step above gives us recipe modules and meta.yaml, but does not contain a requirements file, | ||
# so we add that here, providing the action with the correct version of pangeo-forge-recipes to install | ||
# in the container at action runtime. | ||
run: | | ||
echo "pangeo-forge-recipes==${{ matrix.recipes-version }}" > pangeo-forge-recipes/examples/feedstock/requirements.txt | ||
- name: "Overwrite meta.yaml" | ||
# The example feedstock contains multiple recipes, but we just want to test gpcp | ||
run: | | ||
grep -E 'recipes|gpcp' pangeo-forge-recipes/examples/feedstock/meta.yaml > temp.yaml \ | ||
&& mv temp.yaml pangeo-forge-recipes/examples/feedstock/meta.yaml | ||
- name: "Deploy recipes" | ||
uses: ./ | ||
with: | ||
# select_recipe_by_label: true | ||
pangeo_forge_runner_config: > | ||
{ | ||
"BaseCommand": { | ||
"feedstock_subdir": "pangeo-forge-recipes/examples/feedstock" | ||
}, | ||
"Bake": { | ||
"prune": true, | ||
"bakery_class": "pangeo_forge_runner.bakery.local.LocalDirectBakery" | ||
}, | ||
"TargetStorage": { | ||
"fsspec_class": "fsspec.implementations.local.LocalFileSystem", | ||
"root_path": "./target" | ||
}, | ||
"InputCacheStorage": { | ||
"fsspec_class": "fsspec.implementations.local.LocalFileSystem", | ||
"root_path": "./cache" | ||
} | ||
} |
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,10 +1,12 @@ | ||
FROM quay.io/pangeo/forge:5e51a29 | ||
FROM ubuntu:22.04 | ||
|
||
RUN conda run -n notebook pip install git+https://github.com/pangeo-forge/pangeo-forge-runner@main | ||
RUN apt-get update && apt-get install -y python3 python3-pip | ||
|
||
# install pangeo-forge-runner. to make this faster, let's drop the pangeo-forge-recipes | ||
# dependency from -runner (because recipes is always installed at runtime anyway) | ||
RUN python3 -m pip install pangeo-forge-runner | ||
|
||
COPY action/deploy_recipe.py /deploy_recipe.py | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENV CONDA_ENV=notebook | ||
|
||
ENTRYPOINT [ "sh", "/entrypoint.sh" ] |
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
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,3 +1,3 @@ | ||
#!/bin/sh -l | ||
|
||
conda run --no-capture-output -n notebook python3 /deploy_recipe.py | ||
python3 /deploy_recipe.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