Skip to content

bump thread_local from 1.1.2 to 1.1.8 #288

bump thread_local from 1.1.2 to 1.1.8

bump thread_local from 1.1.2 to 1.1.8 #288

Workflow file for this run

name: Tests
on: [create, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Start K3S
uses: debianmaster/[email protected]
id: k3s
with:
version: 'latest'
- uses: actions/checkout@v2
- name: Run tests
run: |
# 🄿🅁🄴🄿🄰🅁🄰🅃🄸🄾🄽🅂
# debianmaster/actions-k3s sets owner of the Kubeconfig output to a different user.
# To generate kubeconfigs for specific service accounts, current user must have read rights to the cluster-admin kubeconfig folder
sudo chown $(id -u):$(id -g) /tmp/output/
export CLUSTER_ADMIN_KUBECONFIG=$KUBECONFIG
# Create cluster role and a service account with permissions and related kubeconfig for CLI module
kubectl apply -f cli/tests/permissions/cluster_role.yaml
bash tests_common/k8s_cluster_setup/kubeconfig.sh h2o-cli default
# Create cluster role and a service account with permissions and related kubeconfig for DEPLOYMENT MODULE
kubectl apply -f deployment/tests/permissions/cluster_role.yaml
bash tests_common/k8s_cluster_setup/kubeconfig.sh h2o-deployment default
# Create cluster role and a service account with permissions and related kubeconfig for OPERATOR
kubectl apply -f operator/tests/permissions/cluster_role.yaml
kubectl apply -f operator/crd/h2os.h2o.ai.crd.yaml
bash tests_common/k8s_cluster_setup/kubeconfig.sh h2o-operator default
# 🅃🄴🅂🅃🅂
# Each module is tested with kubeconfig reflecting service account with just enough permissions
# for the given module.
#Test CLI module
export KUBECONFIG=$(pwd)/kubeconfigs-generated/kubeconfig-h2o-cli-default.yaml
cargo test -p h2ok --verbose
# Test DEPLOYMENT module
export KUBECONFIG=$(pwd)/kubeconfigs-generated/kubeconfig-h2o-deployment-default.yaml
cargo test -p deployment --verbose
# Test OPERATOR module
export KUBECONFIG=$(pwd)/kubeconfigs-generated/kubeconfig-h2o-operator-default.yaml
cargo test -p h2o-operator --verbose
# Create new service account for OPERATOR with CRD v1beta1
# Permissions are on purpose expected to be the same for v1beta1 H2O CRD, therefore the same ClusterRole is used
export KUBECONFIG=$CLUSTER_ADMIN_KUBECONFIG
kubectl apply -f operator/bundle/manifests/h2os.h2o.ai.crd.yaml # Overrides previous H2O CRDs
# Test OPERATOR module with CRD v1beta1 to test out the Red Hat version of the H2O custom resource
export KUBECONFIG=$(pwd)/kubeconfigs-generated/kubeconfig-h2o-operator-default.yaml
cargo test -p h2o-operator --verbose