Skip to content

Update continuous_integration.yml #51

Update continuous_integration.yml

Update continuous_integration.yml #51

# Workflow for continuous integration tests
name: Continuous integration gfortran compilers
on: [push, pull_request, workflow_dispatch]
jobs:
# This workflow contains a single job called "ci_gfortran"
ci_gfortran:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [3.11]
# Sequence of tasks that will be executed as part of the job
defaults:
run:
shell: bash -el {0}
env:
GDKGO1: https://docs.google.com/uc?export=download&id=11dKcIL3EQr7s6jbo4f9GsoW0SufesGbq
GDKGO2: https://docs.google.com/uc?export=download&id=1s5Ha6Hqnv_hWbRUs8KQpJ4Lxy8uvJDar
GDKGO3: https://docs.google.com/uc?export=download&id=1kY1lRgzd0UhDiQef2u-VgTQql_iut3U2
steps:
###############################################################################
# Initial steps
###############################################################################
# Checks-out repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- name: List dirs
run: |
pwd
ls
- name: Setup conda environment
uses: conda-incubator/[email protected]
with:
auto-update-conda: true
activate-environment: cienv
environment-file: etc/environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Environment info
run: |
conda info
###############################################################################
# Retrieve files and run tests
###############################################################################
- name: Retrieve input files
run: |
cd ${GITHUB_WORKSPACE}
OUTPATH=driver/data/outputs/kgo1.nc.gz
curl -sSfL -o $OUTPATH $GDKGO1
gunzip ${OUTPATH}
cd driver/data/outputs
ls -lh
- id: google-token
uses: playeveryware/[email protected]
with:
credentials: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS }}
scope: 'https://www.googleapis.com/auth/drive.readonly'
- name: Show (masked) token
run: |

Check failure on line 60 in .github/workflows/continuous_integration.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/continuous_integration.yml

Invalid workflow file

You have an error in your yaml syntax on line 60
echo "Masked token ${{ steps.google-token.outputs.token }}"
# - name: Acquire Google access token
# id: google-access-token
# uses: playeveryware/action-google-access-token@v1
# with:
# credentials: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_CREDENTIALS }}
# scope: 'https://www.googleapis.com/auth/drive.readonly'
- name: Download file
uses: playeveryware/[email protected]
with:
token: ${{ steps.google-access-token.outputs.token }}
file-id: 11dKcIL3EQr7s6jbo4f9GsoW0SufesGbq
path: driver/data/outputs/kgo2.nc.gz
- name: Unzip and list downloaded files
run: |
cd ${GITHUB_WORKSPACE}
gunzip driver/data/outputs/kgo1.nc.gz
gunzip driver/data/outputs/kgo2.nc.gz
ls -lh driver/data/outputs
- name: Test python environment
run: |
cd driver
python test.py