-
Notifications
You must be signed in to change notification settings - Fork 11
108 lines (108 loc) · 3.39 KB
/
scheduled-run-all-tests-workflow.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
on:
schedule:
- cron: "0 0 * * *"
name: "Nightly matrix workflow"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test_matrix:
strategy:
fail-fast: false
matrix:
specs:
[
"datasource",
"interface",
"path",
"batch-jberet",
"core-management",
"deployment-scanner",
"distributable-web",
"ee",
"ejb",
"elytron",
"elytron-oidc-client",
"health",
"io",
"jmx",
"jpa",
"jsf",
"mail",
"metrics",
"runtime",
"security-manager",
"system-property",
"transaction",
"weld",
"homepage",
"smoke",
"update-manager",
"undertow",
]
exclude:
- specs: "update-manager"
name: "Run tests"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout project"
uses: actions/checkout@v3
- name: "Setup NodeJS"
uses: actions/setup-node@v3
with:
node-version: "16"
- name: "Setup JDK"
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "17"
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: stable
- name: Install Firefox
uses: browser-actions/setup-firefox@v1
with:
firefox-version: "latest-esr"
- name: "Check docker status"
run: "systemctl status docker"
- name: "Run npm install"
run: "npm install"
- name: "Run compile"
run: "npm run compile"
- name: "Run test(s)"
run: "cd packages/testsuite && npm test -- --browser=chrome --specs=cypress/e2e/${{ matrix.specs }}/*.cy.ts"
- name: "Archive test report(s) and video(s)"
if: ${{ !cancelled() }}
uses: "actions/upload-artifact@v3"
with:
name: "${{ github.run_id}}-${{ strategy.job-index }}-artifacts"
path: |
packages/testsuite/results
packages/testsuite/cypress/videos
process_report:
name: "Collect results & deploy GH pages"
if: ${{ !cancelled() }}
needs: test_matrix
runs-on: ubuntu-latest
steps:
- name: "Download artifacts"
uses: "actions/download-artifact@v3"
- name: "Setup NodeJS"
uses: actions/setup-node@v3
with:
node-version: "16"
- name: "Install necessary tools"
run: npm install -g copyfiles gh-pages@3.0.0 mochawesome-merge mochawesome-report-generator
- name: "Generate Mochawesome Report"
run: mochawesome-merge "./*-artifacts/results/cypress/e2e/*.json" > mochawesome.json
- name: "Copy video assets"
run: copyfiles -u 3 "./*-artifacts/cypress/videos/*.mp4" mochawesome-report/assets/videos
- name: "Create GH Pages content"
run: marge mochawesome.json -f index.html
- name: "Get time info"
uses: josStorer/get-current-time@v2
id: current-time
- name: "Publish GH Pages"
run: |
gh-pages -r https://git:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git -d mochawesome-report -f -u "github-actions-bot <support+actions@github.com>" -m "${{ steps.current-time.outputs.readableTime }}"