Change names of the notebooks #200
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
# Workflow to test CDSE notebook samples | |
name: test-samples | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
concurrency: | |
group: test-notebook-samples | |
# cancel-in-progress: true | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "test" | |
test: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Login to CloudFerro Docker registry | |
- name: Docker Login | |
uses: docker/login-action@v2.1.0 | |
with: | |
registry: registry.cloudferro.com | |
username: ${{ secrets.CF_REGISTRY_USERNAME }} | |
password: ${{ secrets.CF_REGISTRY_PASSWORD }} | |
# Specifies whether the given registry is ECR (auto, true or false) | |
ecr: false | |
# Log out from the Docker registry at the end of a job | |
logout: true | |
- name: Start JupyterLab container | |
id: start-jupyterlab-container | |
run: | | |
chmod -R 0777 $GITHUB_WORKSPACE | |
container_id=`docker run -v $GITHUB_WORKSPACE:/home/jovyan/samples \ | |
--env="CDSE_USERNAME=${{ secrets.CDSE_USERNAME }}" \ | |
--env="CDSE_PASSWORD=${{ secrets.CDSE_PASSWORD }}" \ | |
--env="SH_CLIENT_ID=${{ secrets.SH_CLIENT_ID }}" \ | |
--env="SH_CLIENT_SECRET=${{ secrets.SH_CLIENT_SECRET }}" \ | |
--env="OPENEO_AUTH_METHOD=client_credentials" \ | |
--env="OPENEO_AUTH_CLIENT_ID=${{ secrets.OPENEO_AUTH_CLIENT_ID }}" \ | |
--env="OPENEO_AUTH_CLIENT_SECRET=${{ secrets.OPENEO_AUTH_CLIENT_SECRET }}" \ | |
--env="OPENEO_AUTH_PROVIDER_ID=CDSE" \ | |
-d --rm registry.cloudferro.com/vito/jupyterhub:rc-92004` | |
echo Started container ${container_id} | |
echo Waiting for jupyterlab to start ... | |
sleep 60 | |
echo "container_id=${container_id}" >> "$GITHUB_ENV" | |
- name: Run Sentinelhub tests | |
if: success() || failure() | |
run: | | |
$GITHUB_WORKSPACE/.test-samples.sh sentinelhub ${{ env.container_id }} | |
- name: Run OpenEO tests | |
if: success() || failure() | |
run: | | |
$GITHUB_WORKSPACE/.test-samples.sh openeo ${{ env.container_id }} | |
- name: Run geo tests | |
if: success() || failure() | |
run: | | |
$GITHUB_WORKSPACE/.test-samples.sh geo ${{ env.container_id }} | |
- name: Stop JupyterLab container | |
if: success() || failure() | |
run: | | |
docker stop ${{ env.container_id }} |