Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 03fe837

Browse files
committed
Use output instead of event specific actions
Use event type to determine need of release
1 parent 1ae7a61 commit 03fe837

File tree

3 files changed

+17
-24
lines changed

3 files changed

+17
-24
lines changed

.github/workflows/maven.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,25 @@ jobs:
5656
${{ matrix.install_dependencies }}
5757
${{ matrix.set_display }}
5858
- name: Build with Maven
59-
run: mvn -B -ntp -q verify --file pom.xml -P 'build,${{ matrix.browser }}'
59+
run: |
60+
mvn -B -ntp -q verify --file pom.xml -P 'build,${{ matrix.browser }}'
6061
- name: Delete output.xml (on Win)
6162
run: |
6263
Get-ChildItem target/robotframework-reports -Include *output.xml -Recurse | Remove-Item
6364
echo "REPORT_FILE=$(Get-ChildItem target/robotframework-reports -Include *report.html -Recurse -Name)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
65+
echo "SHA=$(("${{ github.event_name }}" -eq "push") ? "${{ github.sha }}" : "${{ github.event.pull_request.head.sha }}")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
6466
if: always() && runner.os == 'Windows'
6567

6668
- name: Delete output.xml (on Unix-like)
6769
run: |
6870
find target/robotframework-reports -type f -name '*output.xml' -exec rm {} +
6971
echo "REPORT_FILE=$(find target/robotframework-reports -type f -name '*report.html' | sed 's#.*/##')" >> $GITHUB_ENV
72+
echo "SHA=$([ "${{ github.event_name }}" == "push" ] && echo "${{ github.sha }}" || echo "${{ github.event.pull_request.head.sha }}")" >> $GITHUB_ENV
7073
if: always() && runner.os != 'Windows'
7174

75+
- name: Print actual triggering commit
76+
run: echo "${{ env.SHA }}"
77+
7278
- name: Archive acceptances test results
7379
uses: actions/[email protected]
7480
with:
@@ -92,33 +98,18 @@ jobs:
9298
with:
9399
route: POST /repos/{repository}/statuses/{sha}
94100
repository: ${{ github.repository }}
95-
sha: ${{ github.event.pull_request.head.sha }}
101+
sha: "${{env.SHA}}"
96102
state: "${{steps.upload_results.outputs.JOB_STATUS}}"
97103
target_url: "${{steps.upload_results.outputs.REPORT_URL}}"
98104
description: "Link to test report."
99105
context: at-results-${{ matrix.browser }}-${{ matrix.os }}-${{ matrix.java-version }}
100106
env:
101107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102-
if: always() && job.status == 'failure' && github.event.pull_request
103-
104-
- uses: octokit/request-action@7e93b91076fad3920c29d44eb2a6311d929db3dd
105-
name: Update status with Github Status API
106-
id: update_status_push
107-
with:
108-
route: POST /repos/{repository}/statuses/{sha}
109-
repository: ${{ github.repository }}
110-
sha: ${{ github.sha }}
111-
state: "${{env.JOB_STATUS}}"
112-
target_url: "${{env.REPORT_URL}}"
113-
description: "Link to test report."
114-
context: at-results-${{ matrix.browser }}-${{ matrix.os }}-${{ matrix.java-version }}
115-
env:
116-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117-
if: always() && job.status == 'failure' && github.event.push
108+
if: always() && job.status == 'failure'
118109

119110
release:
120111
needs: [build_and_test]
121-
if: github.event.push
112+
if: github.event_name == 'push'
122113
runs-on: ubuntu-latest
123114
name: Release package
124115
steps:
@@ -135,4 +126,4 @@ jobs:
135126
gpg_passphrase: ${{ secrets.gpg_passphrase }}
136127
nexus_username: ${{ secrets.nexus_username }}
137128
nexus_password: ${{ secrets.nexus_password }}
138-
maven_args: -DskipTests
129+
maven_args: -DskipTests

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
<dependency>
161161
<groupId>org.seleniumhq.selenium</groupId>
162162
<artifactId>htmlunit-driver</artifactId>
163-
<version>2.52.0</version>
163+
<version>2.53.0</version>
164164
<exclusions>
165165
<exclusion>
166166
<groupId>org.seleniumhq.selenium</groupId>
@@ -344,7 +344,7 @@
344344
<!-- Weave the failure handler into the code -->
345345
<groupId>org.codehaus.mojo</groupId>
346346
<artifactId>aspectj-maven-plugin</artifactId>
347-
<version>1.11</version>
347+
<version>1.14.0</version>
348348
<executions>
349349
<execution>
350350
<goals>
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
*** Settings ***
22
Resource ../../settings/Settings.robot
3+
Library String
34

45
*** Test Cases ***
56
Cookies
67
Open Browser http://www.whatarecookies.com/cookietest.asp ${browser} mainbrowser
78
Handle Cookie Consent cookieconsent_btn
8-
${all_cookies}= Get Cookies
9-
${test}= Get Cookie Value cookieconsent
9+
${all_cookies} Get Cookies
10+
${first cookie name} Split String ${all_cookies} =
11+
${test} Get Cookie Value ${first cookie name}[0]
1012
Close Browser

0 commit comments

Comments
 (0)