-
Notifications
You must be signed in to change notification settings - Fork 13
85 lines (83 loc) · 2.29 KB
/
ci.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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch: [x64]
os: [ubuntu-latest]
python-version: ["3.10.x"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
architecture: ${{ matrix.arch }}
python-version: ${{ matrix.python-version }}
- name: Set up Poetry and upgrade pip
run: |
pip install -U pip poetry
- name: Install test dependencies
run: |
pip install --prefer-binary -r requirements-test.txt
- name: Install flows
run: |
pip install --prefer-binary .
- name: Check if `prefect build` works
run: |
prefect build
- name: Get changed files for code tree analysis
id: files
uses: Ana06/[email protected]
- name: Perform code tree analysis
id: code-tree-analysis
continue-on-error: true
run: |
python .github/workflows/scripts/code_tree_analysis.py "${{ steps.files.outputs.all }}"
- name: Comment PR
uses: thollander/actions-comment-pull-request@v1
with:
message: "${{ steps.code-tree-analysis.outputs.pr-message }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
pytest
lint_python:
name: Lint Python
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10.x"
- name: Set up poetry and upgrade pip
run: |
pip install -U pip poetry
pip install isort
pip install black
pip install autoflake
pip install flake8
- name: Install this package
run: poetry install
- name: Lint source code
run: poetry run lint
lint_docker:
name: Lint Dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run hadolint
uses: reviewdog/action-hadolint@v1
with:
reporter: github-pr-review