fix: Исправление ошибок в скриптах
Some checks failed
Ansible Testing / lint (push) Has been cancelled
Ansible Testing / test (default) (push) Has been cancelled
Ansible Testing / test (minimal) (push) Has been cancelled
Ansible Testing / test (performance) (push) Has been cancelled
Ansible Testing / deploy-check (push) Has been cancelled
Some checks failed
Ansible Testing / lint (push) Has been cancelled
Ansible Testing / test (default) (push) Has been cancelled
Ansible Testing / test (minimal) (push) Has been cancelled
Ansible Testing / test (performance) (push) Has been cancelled
Ansible Testing / deploy-check (push) Has been cancelled
Исправленные проблемы: - Makefile: убран лишний 'fi' после удаления test-standart.sh - role-manager.sh: изменен set -euo pipefail на set -e для совместимости - Makefile: добавлен < /dev/tty для интерактивных команд (create, delete) - test-custom-images.sh: добавлена поддержка команды 'check' Результат: - make role create теперь работает корректно - make role delete теперь работает корректно - make custom-images check теперь работает корректно - Все остальные скрипты протестированы и работают
This commit is contained in:
44
.github/workflows/ansible-test.yml
vendored
Normal file
44
.github/workflows/ansible-test.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: Ansible Testing
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install ansible ansible-lint
|
||||
ansible-galaxy collection install -r requirements.yml
|
||||
- name: Run lint
|
||||
run: make role lint
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
strategy:
|
||||
matrix:
|
||||
preset: [minimal, default, performance]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Docker
|
||||
run: |
|
||||
sudo systemctl start docker
|
||||
sudo usermod -aG docker $USER
|
||||
- name: Run tests
|
||||
run: make role test ${{ matrix.preset }}
|
||||
|
||||
deploy-check:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [lint, test]
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check deployment
|
||||
run: make role deploy
|
||||
env:
|
||||
ANSIBLE_HOST_KEY_CHECKING: false
|
||||
Reference in New Issue
Block a user