mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-13 03:58:47 +00:00
40 lines
913 B
YAML
40 lines
913 B
YAML
---
|
|
name: CI
|
|
|
|
# Controls when the action will run.
|
|
on:
|
|
# Triggers the workflow on push or pull request events but only for the master branch
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the codebase
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Python 3
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Install test dependencies
|
|
run: pip3 install ansible yamllint ansible-lint
|
|
|
|
- name: Lint yaml files
|
|
run: |
|
|
ansible-lint nas.yml
|
|
yamllint .
|
|
|
|
- name: Lint docs
|
|
uses: articulate/actions-markdownlint@v1
|
|
with:
|
|
config: markdownlint-config.json
|
|
files: "docs/**/*.md"
|