-
Notifications
You must be signed in to change notification settings - Fork 17
77 lines (72 loc) · 2.15 KB
/
Copy pathbuild.yml
File metadata and controls
77 lines (72 loc) · 2.15 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
name: Build
on:
workflow_dispatch:
pull_request:
branches:
- "*"
push:
branches:
- "main"
- "hotfix-*"
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm ci
- name: "Fetch & Unpack Allure Commandline from Maven Central"
run: ./fetch-source.sh
- run: npm pack
- id: get_version
run: echo version=$(npm pkg get version) >> $GITHUB_OUTPUT
- run: mv allure-commandline-${{ fromJSON(steps.get_version.outputs.version) }}.tgz package.tgz
- name: Upload allure-commandline artifact
uses: actions/upload-artifact@v5
with:
name: allure-commandline
path: package.tgz
- name: Upload test data
uses: actions/upload-artifact@v5
with:
name: test-data
path: test-data
test:
needs: build
strategy:
fail-fast: false
matrix:
node-version: [ 18, 20, 22, 24 ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
results: [ 'directory with space', simple ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-package: 'jre'
java-version: 8
- name: Download allure-commandline artifact
uses: actions/download-artifact@v6
with:
name: allure-commandline
- name: Download test-data artifact
uses: actions/download-artifact@v6
with:
name: test-data
- name: Print bundled allure-commandline version
run: npx --yes package.tgz --version
- name: Generate Allure Report
run: npx --yes package.tgz generate "${{ matrix.results }}"
- name: Fail the job if the report has no results
if: ${{ hashFiles('allure-report/data/test-cases/') == '' }}
run: exit 1