-
Notifications
You must be signed in to change notification settings - Fork 4
91 lines (77 loc) · 2.29 KB
/
pr_checks.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
86
87
88
89
90
91
name: Pull request checks
on:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
base:
runs-on: ubuntu-latest
steps:
- name: Checkout change
uses: actions/checkout@v3
with:
path: permian
- name: Build main container
run: |
pushd $GITHUB_WORKSPACE/permian
./build_container
popd
- name: Run base tests
run: |
pushd $GITHUB_WORKSPACE/permian
./in_container make test
popd
- name: Build documentation
run: |
pushd $GITHUB_WORKSPACE/permian
./in_container make doc
popd
- name: Cleanup
if: always()
run: |
podman rmi -f permian
secrets-check:
name: Check if some secrets are set
runs-on: ubuntu-latest
outputs:
result: ${{ steps.extra_plugins.outputs.result }}
steps:
- name: Check if ADDITIONAL_PLUGINS_REPO is set
id: extra_plugins
run: echo "result=${{ secrets.ADDITIONAL_PLUGINS_REPO != '' }}" >> $GITHUB_OUTPUT
extra-plugins:
runs-on: [self-hosted, kstest]
needs: secrets-check
if: needs.secrets-check.outputs.result
steps:
- name: Checkout change
uses: actions/checkout@v3
with:
path: permian
- name: Clone repository with additional plugins and tests
run: |
git clone --depth 1 ${{ secrets.ADDITIONAL_PLUGINS_REPO }} permian-redhat > /dev/null 2>&1
- name: Build main container
run: |
pushd $GITHUB_WORKSPACE/permian
./build_container
popd
- name: Build container for extra plugins and tests
run: |
pushd $GITHUB_WORKSPACE/permian-redhat
./build_container > /dev/null 2>&1
popd
- name: Run extra tests
run: |
pushd $GITHUB_WORKSPACE/permian
export PIPELINEPLUGINS_PATH="$GITHUB_WORKSPACE/permian-redhat/plugins"
$GITHUB_WORKSPACE/permian-redhat/in_container make test > /dev/null 2>&1
popd
- name: Cleanup
if: always()
run: |
rm -rf $GITHUB_WORKSPACE/permian-redhat
podman rmi -f permian-redhat || true
podman rmi -f permian