Skip to content

CI: Add AWS integration test workflow, clean up #1

CI: Add AWS integration test workflow, clean up

CI: Add AWS integration test workflow, clean up #1

name: test-aws-integration
on:
schedule:
- cron: "0 0 * * MON"
##### ONLY FOR TESTING - REMOVE AFTER TESTING #####
pull_request:
#####
workflow_dispatch:
inputs:
branch:
description: 'Nebari branch to deploy, test, destroy'
required: true
default: 'develop'
type: string
image-tag:
description: 'Nebari image tag created by the nebari-docker-images repo'
required: true
default: 'main'
type: string
tf-log-level:
description: 'Change Terraform log levels'
required: false
default: 'info'
type: choice
options:
- info
- warn
- debug
- trace
- error
env:
AWS_DEFAULT_REGION: "us-west-2"
NEBARI_GH_BRANCH: ${{ github.event.inputs.branch || "develop" }}

Check failure on line 36 in .github/workflows/test_aws_integration.yaml

View workflow run for this annotation

GitHub Actions / test-aws-integration

Invalid workflow file

The workflow is not valid. .github/workflows/test_aws_integration.yaml (Line: 36, Col: 21): Unexpected symbol: '"develop"'. Located at position 31 within expression: github.event.inputs.branch || "develop" .github/workflows/test_aws_integration.yaml (Line: 37, Col: 21): Unexpected symbol: '"main"'. Located at position 34 within expression: github.event.inputs.image-tag || "main"
NEBARI_IMAGE_TAG: ${{ github.event.inputs.image-tag || "main" }}
TF_LOG: ${{ github.event.inputs.tf-log-level }}
jobs:
test-aws-integration:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.NEBARI_GH_BRANCH }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Nebari
run: |
pip install .[dev]
conda install --quiet --yes conda-build
playwright install
- name: Retrieve secret from Vault
uses: hashicorp/[email protected]
with:
method: jwt
url: "https://quansight-vault-public-vault-b2379fa7.d415e30e.z1.hashicorp.cloud:8200"
namespace: "admin/quansight"
role: "repository-nebari-dev-nebari-role"
secrets: |
kv/data/repository/nebari-dev/nebari/amazon_web_services/nebari-dev-ci role_name | AWS_ROLE_ARN;
kv/data/repository/nebari-dev/nebari/cloudflare/[email protected]/nebari-dev-ci token | CLOUDFLARE_TOKEN;
- name: Authenticate to AWS
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
role-session-name: github-action
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Integration Tests
run: |
pytest --version
pytest tests/tests_integration/ -vvv -s --cloud aws
with:
NEBARI_SECRET__default_images__jupyterhub: "quay.io/nebari/nebari-jupyterhub:${{ env.NEBARI_IMAGE_TAG }}"
NEBARI_SECRET__default_images__jupyterlab: "quay.io/nebari/nebari-jupyterlab:${{ env.NEBARI_IMAGE_TAG }}"
NEBARI_SECRET__default_images__dask_worker: "quay.io/nebari/nebari-dask-worker:${{ env.NEBARI_IMAGE_TAG }}"