-
Notifications
You must be signed in to change notification settings - Fork 7
148 lines (129 loc) · 4.81 KB
/
test.yml
File metadata and controls
148 lines (129 loc) · 4.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
# This workflow will build the main SET application and publish it to GitHub Packages
name: Test SET
on:
workflow_run:
workflows: ["Build SET"]
types: [completed]
branches:
- '*'
jobs:
swtbot:
runs-on: windows-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: write
checks: write
pull-requests: write
actions: read
steps:
- uses: actions/checkout@v6
- name: Setup Java
uses: eclipse-set/build/.github/actions/setup-java@main
- name: Fetch SET
uses: actions/download-artifact@v7
with:
name: eclipse-set-snapshot-${{github.run_number}}
path: ${{ env.TEST_APPLICATION_DIR }}
- name: Fetch m2 Deploy
# For main or tag build, the m2 packages can be taken directly from github m2package
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')
uses: actions/download-artifact@v7
with:
name: set-m2deploy-${{github.run_number}}
path: ${{ env.DEPLOY_DIR }}
- name: Fetch main csv files
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/tags/')
uses: eclipse-set/build/.github/actions/fetch-main-table-csv-ref@main
with:
repo: ${{ github.repository }}
continue-on-error: true
- name: Cache m2repo
uses: actions/cache@v5
with:
enableCrossOsArchive: true
path: ~/.m2/repository
key: ${{ runner.os }}-m2repo-${{ hashFiles('**/java/bundles/org.eclipse.set.releng.target/org.eclipse.set.releng.target.target', 'pom.xml') }}
restore-keys: ${{ runner.os }}-m2repo-
- name: Run Test
id: test-steps
shell: bash
run: |
m2RepoPath="https://maven.pkg.github.com/eclipse-set/set"
if [[ "${{ github.event_name }}" == "pull_request" || "${{github.ref}}" == refs/heads/release/* ]]; then
m2RepoPath="file://${{ env.DEPLOY_DIR }}"
fi
mvn -T 1.5C -U -B -f java-test/pom.xml clean verify \
--settings ./.github/settings.xml \
-Dskip-test=false \
-Dm2-repo-path="$m2RepoPath" \
-Dapplication-under-test="${{ env.TEST_APPLICATION_DIR }}" \
- name: Upload csv files
if: failure() && steps.test-steps.outcome == 'failure'
uses: actions/upload-artifact@v6
with:
name: table-csv-${{github.run_number}}
path: ${{ github.workspace}}/java/bundles/org.eclipse.set.swtbot/target/classes/diff/**/*.csv
retention-days: 7
table-diff-view:
runs-on: ubuntu-latest
needs: swtbot
if: always() && github.actor_id != 49699333 && !startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/tags/')
container: ghcr.io/eclipse-set/table-diff-view:latest
permissions:
contents: write
checks: write
pull-requests: write
actions: read
issues: write
steps:
- name: Get Branchname
shell: bash
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
else
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
fi
- name: Fetch table csv
if: needs.swtbot.result == 'failure'
uses: actions/download-artifact@v7
with:
name: table-csv-${{github.run_number}}
path: ${{ env.DIFF_DIR }}
- name: Create diff view
shell: bash
run: |
python -m tablediffview \
--diffDir=${{ env.DIFF_DIR }} \
--branchName=${{ env.BRANCH_NAME }} \
--prNumber=${{github.event.pull_request.number}} \
--runId=${{github.run_id}}
- name: Upload Diff-File
if: needs.swtbot.result == 'failure'
uses: actions/upload-artifact@v6
with:
name: table-diff-files-${{github.run_number}}
path: ${{ env.DIFF_DIR }}/diff-md
retention-days: 5
test-siteplan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
- name: Install dependencies
run: npm ci
working-directory: web/siteplan
- name: Install Playwright Browsers
run: npm exec playwright install --with-deps
working-directory: web/siteplan
- name: Run Playwright tests
run: npm run test:e2e
working-directory: web/siteplan
- uses: actions/upload-artifact@v6
if: ${{ !cancelled() }}
with:
name: playwright-report
path: web/siteplan/playwright-report/
retention-days: 1