-
Notifications
You must be signed in to change notification settings - Fork 66
175 lines (153 loc) · 5.81 KB
/
Copy pathftest.yaml
File metadata and controls
175 lines (153 loc) · 5.81 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Functional tests
on:
pull_request:
branches:
- maintenance-3.1.x
- lts-2025
workflow_call:
inputs:
branch:
description: 'Branch to build'
type: string
required: false
default: ''
secrets:
NPM_PACKAGES_TOKEN:
required: true
REPOSITORY_MANAGER_USERNAME:
required: true
REPOSITORY_MANAGER_PASSWORD:
required: true
env:
NPM_REPOSITORY: https://packages.nuxeo.com/repository/npm-public/
NODE_OPTIONS: "--max-old-space-size=2048"
REFERENCE_BRANCH: ${{ github.base_ref || inputs.branch || github.ref_name }}
jobs:
ftests:
runs-on:
group: medium-4cpu-runners
permissions:
contents: read
steps:
- name: Debug
run: |
echo "Event: ${{ github.event_name }}"
echo "Actor: ${{ github.actor }}"
echo "Base branch: ${{ github.base_ref }}"
echo "Ref: ${{ github.ref }}"
- uses: catchpoint/workflow-telemetry-action@v2
with:
comment_on_pr: false
- name: Checkout code
uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
registry-url: ${{ env.NPM_REPOSITORY }}
always-auth: true
scope: '@nuxeo'
node-version: 22
- name: Setup Maven build
uses: nuxeo/gh-build-tools/.github/actions/setup-maven-build@v0.14.0
with:
java-version: ${{ (github.base_ref || inputs.branch || github.ref_name) == 'lts-2025' && 21 || 17 }}
- name: Purge cached Nuxeo artifacts
run: rm -rf ~/.m2/repository/org/nuxeo
- name: Cache npm dependencies
uses: actions/cache@v5
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('package.json', 'packages/nuxeo-web-ui-ftest/package.json', 'packages/nuxeo-designer-catalog/package.json') }}
restore-keys: |
npm-${{ runner.os }}-
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y imagemagick poppler-utils libreoffice ffmpeg libwpd-tools ghostscript exiftool
sudo sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
npm install -g bower gulp-cli
- name: Determine nuxeo-elements branch to link
id: pick_nuxeo_elements_branch
run: |
if git ls-remote --exit-code --heads https://github.com/nuxeo/nuxeo-elements ${{ env.REFERENCE_BRANCH }}; then
echo "branch=${{ env.REFERENCE_BRANCH }}" >> $GITHUB_OUTPUT
else
echo "branch=${{ github.base_ref || env.REFERENCE_BRANCH }}" >> $GITHUB_OUTPUT
fi
- name: Install Web UI
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
run: |
npm ci --ignore-scripts
pushd packages/nuxeo-web-ui-ftest
npm ci
popd
pushd packages/nuxeo-designer-catalog
npm ci
popd
- name: Checkout the nuxeo-elements repo
uses: actions/checkout@v7
with:
repository: nuxeo/nuxeo-elements
path: nuxeo-elements
fetch-depth: 1
ref: ${{ steps.pick_nuxeo_elements_branch.outputs.branch }}
- name: Pack Elements modules
run: |
pushd nuxeo-elements
for d in core ui dataviz testing-helpers; do
pushd $d
echo "ELEMENTS_$(echo $d | tr 'a-z-' 'A-Z_')=$(npm pack 2>&1 | tail -1)" >> $GITHUB_ENV
popd
done
popd
- name: Link elements to Web UI
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }}
run: |
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/core/${ELEMENTS_CORE}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/ui/${ELEMENTS_UI}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/dataviz/${ELEMENTS_DATAVIZ}
npm install --no-package-lock --@nuxeo:registry="${{ env.NPM_REPOSITORY }}" nuxeo-elements/testing-helpers/${ELEMENTS_TESTING_HELPERS}
- name: Functional tests
env:
MVN_REPO_USERNAME: ${{ secrets.REPOSITORY_MANAGER_USERNAME }}
MVN_REPO_PASSWORD: ${{ secrets.REPOSITORY_MANAGER_PASSWORD }}
RUN_ALL: false
BAIL: 0
HEADLESS: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'video') && 'false' || 'true' }}
uses: Alfresco/alfresco-build-tools/.github/actions/xvfb-record@v18.13.0
with:
test_command: mvn -ntp install -Pftest -DskipInstall
timeout_minutes: 120
video_name: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'video') && 'ftest-video' || '' }}
max_attempts: 3
- name: Archive cucumber reports
if: always()
uses: actions/upload-artifact@v7
with:
name: cucumber-reports
path: ftest/target/cucumber-reports/
- name: Archive screenshots
if: failure()
uses: actions/upload-artifact@v7
with:
name: screenshots
path: ftest/target/screenshots/
- name: Archive logs
if: always()
uses: actions/upload-artifact@v7
with:
name: logs
path: |
**/log/*.log
**/nxserver/config/distribution.properties
- name: Archive packages-ftest
if: always()
uses: actions/upload-artifact@v7
with:
name: packages-ftest
path: |
plugin/web-ui/marketplace/target/nuxeo-web-ui-marketplace-*.zip
plugin/itests/marketplace/target/nuxeo-web-ui-marketplace-itests-*.zip