diff --git a/.gitignore b/.gitignore index 56ef9602..5e6a4492 100644 --- a/.gitignore +++ b/.gitignore @@ -132,6 +132,9 @@ celerybeat.pid # SageMath parsed files *.sage.py +# Ansible tests +.ansible + # Environments .env .venv diff --git a/.test.sh b/.test.sh new file mode 100755 index 00000000..087d5aab --- /dev/null +++ b/.test.sh @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- + +# Copyright 2024 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p bash +mkdir -p .ansible/collections/ansible_collections/cloudera/cluster +git archive $(git rev-parse --abbrev-ref HEAD) | tar -x -C .ansible/collections/ansible_collections/cloudera/cluster +(cd .ansible/collections/ansible_collections/cloudera/cluster && pytest) +