forked from StackStorm-Exchange/ci
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (81 loc) · 2.52 KB
/
pack-build_and_test.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
name: CI - Build and Test
on:
workflow_call:
inputs:
apt-cache-version:
required: false
type: string
default: "v0"
py-cache-version:
required: false
type: string
default: "v0"
python-version:
required: false
type: string
default: "3.6"
enable-common-libs:
description: |
When true, use an st2.conf that sets packs.enable_common_libs=true
see: https://docs.stackstorm.com/reference/sharing_code_sensors_actions.html
required: false
type: boolean
default: false
st2-branch:
required: false
type: string
default: master
lint-configs-branch:
required: false
type: string
default: master
force-check-all-files:
required: false
type: boolean
default: true
jobs:
build_and_test:
runs-on: ubuntu-20.04
# When parent workflow is named "Build and Test" this shows up as:
# "Build and Test / Python 3.6"
name: 'Python ${{ matrix.python-version }}'
strategy:
matrix:
include:
- python-version: ${{ inputs.python-version }}
steps:
- name: Checkout Pack Repo and CI Repos
uses: StackStorm-Exchange/ci/.github/actions/checkout@master
with:
st2-branch: ${{ inputs.st2-branch }}
lint-configs-branch: ${{ inputs.lint-configs-branch }}
- name: Install APT Dependencies
uses: StackStorm-Exchange/ci/.github/actions/apt-dependencies@master
with:
cache-version: ${{ inputs.apt-cache-version }}
- name: Install Python Dependencies
uses: StackStorm-Exchange/ci/.github/actions/py-dependencies@master
with:
cache-version: ${{ inputs.py-cache-version }}
python-version: ${{ matrix.python-version }}
- name: Run pack tests
uses: StackStorm-Exchange/ci/.github/actions/test@master
with:
enable-common-libs: ${{ inputs.enable-common-libs }}
force-check-all-files: ${{ inputs.force-check-all-files }}
- name: Ensure CHANGES.md and pack.yaml changed (and Pack version increased)
if: ${{ github.event_name == 'pull_request' }}
uses: StackStorm-Exchange/ci/.github/actions/pack-meta@master
services:
mongo:
image: mongo:3.4
ports:
- 27017:27017
rabbitmq:
image: rabbitmq:3
ports:
- 5672:5672
#redis:
# image: redis
# ports:
# - 6379:6379