-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #733 from ceph/tests
github: add syntax and lint checks
- Loading branch information
Showing
13 changed files
with
73 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
skip_list: | ||
- command-instead-of-module | ||
- command-instead-of-shell | ||
- deprecated-command-syntax | ||
- deprecated-local-action | ||
- empty-string-compare | ||
- experimental | ||
- fqcn[action-core] | ||
- fqcn[action] | ||
- git-latest | ||
- jinja | ||
- literal-compare | ||
- load-failure | ||
- meta-no-info | ||
- name[casing] | ||
- no-changed-when | ||
- no-handler | ||
- no-jinja-when | ||
- no-relative-paths | ||
- package-latest | ||
- risky-file-permissions | ||
- risky-shell-pipe | ||
- role-name | ||
- unnamed-task |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
syntax-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install ansible | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get purge ansible | ||
sudo apt-get install python3-setuptools | ||
pip3 install ansible --user | ||
- name: ansible-playbook syntax check | ||
run: | | ||
export PATH=$PATH:$HOME/.local/bin | ||
sed -i /^vault_password_file/d ansible.cfg | ||
ansible-playbook -i localhost, cephlab.yml --syntax-check | ||
ansible-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install ansible-lint | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get purge ansible | ||
sudo apt-get install python3-setuptools | ||
# This pinned ansible version should match teuthology's | ||
# requirements.txt. | ||
# And we choose an ansible-lint version to be compatible with this | ||
# Ansible version. | ||
pip3 install ansible==2.10.7 ansible-lint[core]==5.4.0 --user | ||
- name: Run ansible-lint | ||
run: | | ||
export PATH=$PATH:$HOME/.local/bin | ||
ansible-lint -v roles/* |
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
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
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
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
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
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
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
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
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
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
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