-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (71 loc) · 2.02 KB
/
ci.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
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
name: ci
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/env-install
- uses: pre-commit/[email protected]
license-header-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./scripts/license_headers_check.sh
pip-installable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/env-install
- run: pip install -e .
pip-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/env-install
- run: pip install -e .
- run: pip install pip-licenses
- run: pip-licenses
operator-image-buildable:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/env-install
- run: pip install build
- run: python -m build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Log in to the Elastic Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ secrets.ELASTIC_DOCKER_REGISTRY }}
username: ${{ secrets.ELASTIC_DOCKER_USERNAME }}
password: ${{ secrets.ELASTIC_DOCKER_PASSWORD }}
- run: docker build -f operator/Dockerfile --build-arg DISTRO_DIR=./dist .
test:
runs-on: ubuntu-latest
env:
py38: 3.8
py39: 3.9
py310: "3.10"
py311: "3.11"
py312: "3.12"
strategy:
fail-fast: false
matrix:
python-version: [py38, py39, py310, py311, py312]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env[matrix.python-version] }}
uses: actions/setup-python@v5
with:
python-version: ${{ env[matrix.python-version] }}
architecture: "x64"
- run: pip install -r dev-requirements.txt
- run: pytest --with-integration-tests