Skip to content

Defer metadata target import #172

Defer metadata target import

Defer metadata target import #172

Workflow file for this run

name: Run Flink Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Starts a k8s cluster with NetworkPolicy enforcement and installs both
# kubectl and helm
#
# ref: https://github.com/jupyterhub/action-k3s-helm/
- uses: jupyterhub/action-k3s-helm@v3
with:
metrics-enabled: false
traefik-enabled: false
docker-enabled: true
- name: Setup CertManager
run: |
# Setup cert-manager, required by Flink Operator
CERT_MANAGER_VERSION=1.9.1
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v${CERT_MANAGER_VERSION}/cert-manager.yaml
- name: Wait for CertManager to be ready
uses: jupyterhub/action-k8s-await-workloads@v1
with:
timeout: 150
max-restarts: 1
namespace: cert-manager
- name: Setup FlinkOperator
run: |
FLINK_OPERATOR_VERSION=1.3.0
helm repo add flink-operator-repo https://downloads.apache.org/flink/flink-kubernetes-operator-${FLINK_OPERATOR_VERSION}
helm install flink-kubernetes-operator flink-operator-repo/flink-kubernetes-operator --wait
kubectl get pod -A
kubectl get crd -A
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v0'
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: 'Setup minio + mc'
run: |
wget --quiet https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
mv minio /usr/local/bin/minio
wget --quiet https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
mv mc /usr/local/bin/mc
minio --version
mc --version
- name: Install dependencies & our package
run: |
python -m pip install --upgrade pip
python -m pip install -r dev-requirements.txt
python -m pip install -e .
- name: Install socat so kubectl port-forward will work
run: |
# Not sure if this is why kubectl proxy isn't working, but let's try
sudo apt update --yes && sudo apt install --yes socat
- name: Test with pytest
run: |
pytest -vvv -s --cov=pangeo_forge_runner tests/integration/test_flink.py
kubectl get pod -A
kubectl describe pod
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2