test yamllint in CI #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [master, main, "release/v*"] | |
pull_request: | |
branches: [master, main, "release/v*"] | |
jobs: | |
ansible-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: run-ansible-lint | |
uses: ansible/ansible-lint@main | |
yamllint: | |
name: run-yamllint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: yamllint | |
uses: reviewdog/action-yamllint@v1 | |
with: | |
github_token: ${{ secrets.github_token }} | |
reporter: github-pr-review # Change reporter. | |
yamllint_flags: 'src/' | |
#- name: Auto Correct YAML lint errors | |
# run: | | |
# echo '# Correct no new line character at the end of file' | |
# sed -i -e '$a\' playbooks/tasks/connectRepo.yml | |
# echo '# Correct trailing spaces" | |
# sed -i -e 's/[ \t]*$//' playbooks/tasks/connectRepo.yml | |
# - name: Set up Python ${{ matrix.python_version }} | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: ${{ matrix.python_version }} | |
# cache: 'pip' | |
# - name: Install yamllint, ansible and molecule | |
# run: | | |
# python -m pip install --upgrade pip | |
# pip install yamllint ansible-core flake8 ansible-lint voluptuous | |
# - name: Auto Correct YAML lint errors | |
# run: | | |
# yamllint . | |