-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (31 loc) · 911 Bytes
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
---
name: Test
# yamllint disable-line rule:truthy
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Setup environment
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install -r test/requirements.txt
- name: Make sure YAML files have the right extension
run: |
# Make sure the files _don't_ end in ".yml"
git ls-files | grep '\.yml$' && exit 1 || exit 0
- name: Lint YAML files through yamllint
run: |
. .venv/bin/activate
git ls-files | grep "\.yaml$" \
| xargs yamllint --strict
- name: Validate data files
run: |
. .venv/bin/activate
./test/validate_data_files.py