forked from redhat-openshift-ecosystem/operator-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 913 Bytes
/
validation.yml
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: validation
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
tox:
name: Run unit tests and linters
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up PDM
uses: pdm-project/setup-pdm@v4
with:
python-version: "3.11"
- name: Install Hadolint via Brew
run: |
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/home/linuxbrew/.linuxbrew/bin/brew install hadolint
sudo ln -s /home/linuxbrew/.linuxbrew/bin/hadolint /usr/bin/
- name: Install Python dependencies
run: |
pdm sync -dG tox
python3 -m pip install ansible-lint
- name: Run Tests
run: |
pdm run -v tox