Skip to content

Feature/shift longitude reverse #416

Feature/shift longitude reverse

Feature/shift longitude reverse #416

Workflow file for this run

# Run notebook documentation tests from the ground up
name: Doc / Notebook tests
on:
# run on push to main
push:
branches:
- main
# run on all PRs
pull_request:
# Allows run manually from the Actions tab
workflow_dispatch:
# Run if a release is published
workflow_call:
# Global variables
env:
PYCONTRAILS_CACHE_DIR: '${{ github.workspace }}/.cache/pycontrails'
# disable all permissions at the top level
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions: {}
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
doc-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
# put bada files in the default location
- name: BADA files
run: |
mkdir ../bada
gcloud storage cp -r gs://contrails-301217-bada/bada/bada3 ${{ github.workspace }}/../bada/
gcloud storage cp -r gs://contrails-301217-bada/bada/bada4 ${{ github.workspace }}/../bada/
# download ERA5 data from pre-cached data on GCP
- name: pycontrails cache (ERA5 data)
run: |
mkdir -p ${{ env.PYCONTRAILS_CACHE_DIR }}
gcloud storage cp -r gs://contrails-301217-unit-test/doc-test-cache/* ${{ env.PYCONTRAILS_CACHE_DIR }}/
- name: Install pycontrails (dev)
run: make dev-install
- name: Install pycontrails-bada extension
run: |
mkdir -p ~/.ssh/ && ssh-keyscan github.com > ~/.ssh/known_hosts
gcloud secrets versions access latest --secret="contrails-301217-github-ssh-key" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
pip install "pycontrails-bada @ git+ssh://[email protected]/contrailcirrus/pycontrails-bada.git"
- name: Test notebooks
run: |
make nb-test
- name: Test docstrings
run: |
make doctest