-
Notifications
You must be signed in to change notification settings - Fork 9
54 lines (48 loc) · 1.52 KB
/
main.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: main
"on":
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check_python:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip setuptools
pip3 install --upgrade '.[dev]'
- name: Check python sources with flake8
run: "flake8 kcidb_io *.py"
- name: Check python sources with pylint
run: "pylint kcidb_io *.py"
- name: Test with pytest
run: KCIDB_IO_HEAVY_ASSERTS=1 pytest
trigger_kcidb_testing:
needs: check_python
runs-on: ubuntu-latest
steps:
- name: Create dispatch event
env:
GITHUB_TOKEN: ${{ secrets.KCIDB_WORKFLOW_TRIGGER_TOKEN }}
run: |
if test -z "$GITHUB_TOKEN"; then
echo "GitHub token is missing." >&2
false
fi
curl --no-progress-meter \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/kernelci/kcidb/dispatches \
-d '{"event_type":"test","client_payload":{"kcidb_io_ref":"'"$GITHUB_REF"'"}}' |
{ ! grep '.\+'; }