-
Notifications
You must be signed in to change notification settings - Fork 612
101 lines (93 loc) · 3.67 KB
/
Copy pathfunctional-workflow.yaml
File metadata and controls
101 lines (93 loc) · 3.67 KB
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
92
93
94
95
96
97
98
99
100
101
name: functional-workflow
on:
merge_group:
pull_request:
schedule:
- cron: '0 0 */3 * *'
jobs:
functional-workflow:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- name: "master"
openstack_version: "master"
ubuntu_version: "24.04"
mistral_plugin_version: "master"
- name: "gazpacho"
openstack_version: "stable/2026.1"
ubuntu_version: "24.04"
mistral_plugin_version: "stable/2026.1"
- name: "epoxy"
openstack_version: "stable/2025.1"
ubuntu_version: "24.04"
mistral_plugin_version: "stable/2025.1"
runs-on: ubuntu-${{ matrix.ubuntu_version }}
name: Mistral on Deploy OpenStack ${{ matrix.name }}
steps:
- name: Checkout Gophercloud
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Check changed files
uses: ./.github/actions/file-filter
id: changed-files
with:
patterns: |
openstack/auth_env.go
openstack/client.go
openstack/endpoint.go
openstack/endpoint_location.go
openstack/config/provider_client.go
openstack/utils/choose_version.go
openstack/utils/discovery.go
**workflow**
.github/workflows/functional-workflow.yaml
- name: Skip tests for unrelated changed-files
if: ${{ ! fromJSON(steps.changed-files.outputs.matches) }}
run: |
echo "No relevant files changed - skipping tests for ${{ matrix.name }}"
echo "TESTS_SKIPPED=true" >> $GITHUB_ENV
- name: Deploy devstack
if: ${{ fromJSON(steps.changed-files.outputs.matches) }}
uses: gophercloud/devstack-action@60ca1042045c0c9e3e001c64575d381654ffcba1 # v0.19
with:
branch: ${{ matrix.openstack_version }}
conf_overrides: |
enable_plugin mistral https://github.com/openstack/mistral ${{ matrix.mistral_plugin_version }}
enabled_services: "mistral,mistral-api,mistral-engine,mistral-executor,mistral-event-engine,openstack-cli-server"
- name: Checkout go
if: ${{ fromJSON(steps.changed-files.outputs.matches) }}
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: 'go.mod'
cache: true
- name: Run Gophercloud acceptance tests
if: ${{ fromJSON(steps.changed-files.outputs.matches) }}
run: |
source ${{ github.workspace }}/script/stackenv
make acceptance-workflow
echo "TESTS_RUN=true" >> $GITHUB_ENV
env:
DEVSTACK_PATH: ${{ github.workspace }}/devstack
OS_BRANCH: ${{ matrix.openstack_version }}
- name: Generate logs on failure
run: ./script/collectlogs
if: ${{ failure() && fromJSON(steps.changed-files.outputs.matches) }}
- name: Upload logs artifacts on failure
if: ${{ failure() && fromJSON(steps.changed-files.outputs.matches) }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: functional-workflow-${{ matrix.name }}-${{ github.run_id }}
path: /tmp/devstack-logs/*
- name: Set job status
run: |
if [[ "$TESTS_SKIPPED" == "true" || "$TESTS_RUN" == "true" ]]; then
echo "Job completed successfully (either ran tests or skipped appropriately)"
exit 0
else
echo "Job failed - neither tests ran nor were properly skipped"
exit 1
fi