-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (60 loc) · 2.35 KB
/
code-quality.yml
File metadata and controls
70 lines (60 loc) · 2.35 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Code Quality
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
quality:
name: Quality
# The quality pipeline should not take more than 10 minutes.
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed markdown files
id: changed-markdown
uses: tj-actions/changed-files@v47
with:
files: |
**/*.md
.github/workflows/code-quality.yml
- name: Get changed action and test paths
id: changed-actions
uses: tj-actions/changed-files@v47
with:
files: |
.github/actions/**
tests/**
- name: Lint all documentation
if: steps.changed-markdown.outputs.any_modified == 'true'
uses: DavidAnson/markdownlint-cli2-action@v14
with:
globs: |
**/*.md
- name: Install bats
if: steps.changed-actions.outputs.any_changed == 'true'
run: sudo npm install -g bats
- name: Test - promote-ecr-image
if: >
contains(steps.changed-actions.outputs.all_changed_files, '.github/actions/promote-ecr-image') ||
contains(steps.changed-actions.outputs.all_changed_files, 'tests/unit/promote-ecr-image')
run: bats --verbose-run tests/unit/promote-ecr-image/
- name: Test - test-python
if: >
contains(steps.changed-actions.outputs.all_changed_files, '.github/actions/test-python') ||
contains(steps.changed-actions.outputs.all_changed_files, 'tests/unit/test-python')
run: bats --verbose-run tests/unit/test-python/
- name: Test - update-aws-ecs
if: >
contains(steps.changed-actions.outputs.all_changed_files, '.github/actions/update-aws-ecs') ||
contains(steps.changed-actions.outputs.all_changed_files, 'tests/unit/update-aws-ecs')
run: bats --verbose-run tests/unit/update-aws-ecs/
- name: Test - update-aws-lambda
if: >
contains(steps.changed-actions.outputs.all_changed_files, '.github/actions/update-aws-lambda') ||
contains(steps.changed-actions.outputs.all_changed_files, 'tests/unit/update-aws-lambda')
run: bats --verbose-run tests/unit/update-aws-lambda/