-
Notifications
You must be signed in to change notification settings - Fork 1.2k
GitHub action #5361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub action #5361
Changes from 21 commits
2964ff0
e2177d3
5aa489a
57f76fd
3bdc6cd
f400f1e
44d4d24
0c8993a
906b1a0
5c421d1
1408f81
fc4212d
880ab52
3150456
b1534d0
f8cec72
0da4b9f
fe8cf67
00308f9
72c5b19
e699537
69be259
e16ad25
268730f
bfb71a2
be2b928
fcd7a84
8914674
69a8043
5e47a4d
44eb282
7fbcb1b
6e37559
9647cdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
name: On Demand Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
enable_ngrok_debug: | ||
description: "Enable Ngrok Debugging" | ||
required: true | ||
type: boolean | ||
default: false | ||
test_suite: | ||
description: Select Test Suite to run | ||
type: choice | ||
options: | ||
- Unit | ||
- System | ||
- MultiRuntime | ||
- Standalone | ||
- Scheduler | ||
- Performance | ||
## Uncomment those to debug the build | ||
- Dummy | ||
#- DummyKO | ||
|
||
env: | ||
# openwhisk env | ||
TEST_SUITE: ${{ inputs.test_suite }} | ||
ANSIBLE_CMD: "ansible-playbook -i environments/local -e docker_image_prefix=testing" | ||
GRADLE_PROJS_SKIP: "" | ||
|
||
# (optional) slack incoming wehbook for notifications | ||
SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} | ||
|
||
# (optional) s3 log upload | ||
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for NGROK, so now contributors are in charge of uploading logs to their own environment to figure out the failed tests of a PR. It needs to be discussed where to place such logs. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes you can put your own AWS_BUCKET where you want. The bucket can be made public as I did here: https://nuvolaris-logs.s3.eu-central-1.amazonaws.com/index.html. |
||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
|
||
# github | ||
GH_BUILD: ${{ github.run_id }}-${{ github.event_name }} | ||
GH_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
|
||
# (optional) you need to add as secrets an ngrok token and a password to debug a build on demand | ||
NGROK_DEBUG: ${{ inputs.enable_ngrok_debug }} | ||
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }} | ||
NGROK_PASSWORD: ${{ secrets.NGROK_PASSWORD }} | ||
|
||
jobs: | ||
openwhisk: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: "Setup" | ||
run: ./tools/github/setup.sh | ||
- id: tests | ||
name: Run Tests | ||
run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" | ||
continue-on-error: true | ||
- id: logs | ||
name: Upload Logs | ||
run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} | ||
- name: Slack Notification | ||
run: > | ||
./tools/github/writeOnSlack.sh "[$TEST_SUITE]" | ||
$GH_BUILD: ${{ steps.tests.outcome }} | ||
$'\nbranch:' $GH_BRANCH | ||
$'\nlogs:' ${{ steps.logs.outputs.logs }} | ||
$'\nreport:' ${{ steps.logs.outputs.report }} | ||
- name: Debug Action (if requested) | ||
run: ./tools/github/debugAction.sh | ||
- name: Wait for Debug (if requested) | ||
run: ./tools/github/waitIfDebug.sh | ||
- name: Results | ||
run: test "${{ steps.tests.outcome }}" == "success" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
name: Unit Tests | ||
|
||
on: | ||
# build on tagged | ||
push: | ||
tags: '*-test*' | ||
# build on pull requests | ||
pull_request: | ||
|
||
env: | ||
# openwhisk env | ||
TEST_SUITE: Unit | ||
ANSIBLE_CMD: "ansible-playbook -i environments/local -e docker_image_prefix=testing" | ||
GRADLE_PROJS_SKIP: "" | ||
|
||
## secrets | ||
# (optional) slack incoming wehbook for notifications | ||
SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} | ||
|
||
# (optional) s3 log upload | ||
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
|
||
# github | ||
GH_BUILD: ${{ github.run_id }}-${{ github.event_name }} | ||
GH_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
openwhisk: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: "Setup" | ||
run: ./tools/github/setup.sh | ||
- id: tests | ||
name: Run Tests | ||
run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" | ||
continue-on-error: true | ||
- id: logs | ||
name: Upload Logs | ||
run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} | ||
- name: Slack Notification | ||
run: > | ||
./tools/github/writeOnSlack.sh "[$TEST_SUITE]" | ||
$GH_BUILD: ${{ steps.tests.outcome }} | ||
$'\nbranch:' $GH_BRANCH | ||
$'\nlogs:' ${{ steps.logs.outputs.logs }} | ||
$'\nreport:' ${{ steps.logs.outputs.report }} | ||
- name: Results | ||
run: test "${{ steps.tests.outcome }}" == "success" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
name: System Tests | ||
|
||
on: | ||
# build on tagged | ||
push: | ||
tags: '*-test*' | ||
# build on pull requests | ||
pull_request: | ||
|
||
env: | ||
# openwhisk env | ||
TEST_SUITE: System | ||
ANSIBLE_CMD: "ansible-playbook -i environments/local -e docker_image_prefix=testing" | ||
GRADLE_PROJS_SKIP: "" | ||
|
||
## secrets | ||
# (optional) slack incoming wehbook for notifications | ||
SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} | ||
|
||
# (optional) s3 log upload | ||
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
|
||
# github | ||
GH_BUILD: ${{ github.run_id }}-${{ github.event_name }} | ||
GH_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
openwhisk: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: "Setup" | ||
run: ./tools/github/setup.sh | ||
- id: tests | ||
name: Run Tests | ||
run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" | ||
continue-on-error: true | ||
- id: logs | ||
name: Upload Logs | ||
run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} | ||
- name: Slack Notification | ||
run: > | ||
./tools/github/writeOnSlack.sh "[$TEST_SUITE]" | ||
$GH_BUILD: ${{ steps.tests.outcome }} | ||
$'\nbranch:' $GH_BRANCH | ||
$'\nlogs:' ${{ steps.logs.outputs.logs }} | ||
$'\nreport:' ${{ steps.logs.outputs.report }} | ||
- name: Results | ||
run: test "${{ steps.tests.outcome }}" == "success" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
name: MultiRuntime Tests | ||
|
||
on: | ||
# build on tagged | ||
push: | ||
tags: '*-test*' | ||
# build on pull requests | ||
pull_request: | ||
|
||
env: | ||
# openwhisk env | ||
TEST_SUITE: MultiRuntime | ||
ANSIBLE_CMD: "ansible-playbook -i environments/local -e docker_image_prefix=testing" | ||
GRADLE_PROJS_SKIP: "" | ||
|
||
## secrets | ||
# (optional) slack incoming wehbook for notifications | ||
SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} | ||
|
||
# (optional) s3 log upload | ||
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
|
||
# github | ||
GH_BUILD: ${{ github.run_id }}-${{ github.event_name }} | ||
GH_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
openwhisk: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: "Setup" | ||
run: ./tools/github/setup.sh | ||
- id: tests | ||
name: Run Tests | ||
run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" | ||
continue-on-error: true | ||
- id: logs | ||
name: Upload Logs | ||
run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} | ||
- name: Slack Notification | ||
run: > | ||
./tools/github/writeOnSlack.sh "[$TEST_SUITE]" | ||
$GH_BUILD: ${{ steps.tests.outcome }} | ||
$'\nbranch:' $GH_BRANCH | ||
$'\nlogs:' ${{ steps.logs.outputs.logs }} | ||
$'\nreport:' ${{ steps.logs.outputs.report }} | ||
- name: Results | ||
run: test "${{ steps.tests.outcome }}" == "success" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
name: Standalone Tests | ||
|
||
on: | ||
# build on tagged | ||
push: | ||
tags: '*-test*' | ||
# build on pull requests | ||
pull_request: | ||
|
||
env: | ||
# openwhisk env | ||
TEST_SUITE: Standalone | ||
ANSIBLE_CMD: "ansible-playbook -i environments/local -e docker_image_prefix=testing" | ||
GRADLE_PROJS_SKIP: "" | ||
|
||
## secrets | ||
# (optional) slack incoming wehbook for notifications | ||
SLACK_WEBHOOK: ${{secrets.SLACK_WEBHOOK}} | ||
|
||
# (optional) s3 log upload | ||
AWS_BUCKET: ${{ secrets.AWS_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
|
||
# github | ||
GH_BUILD: ${{ github.run_id }}-${{ github.event_name }} | ||
GH_BRANCH: ${{ github.head_ref || github.ref_name }} | ||
|
||
jobs: | ||
openwhisk: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: "Setup" | ||
run: ./tools/github/setup.sh | ||
- id: tests | ||
name: Run Tests | ||
run: "./tools/github/run${{ env.TEST_SUITE }}Tests.sh" | ||
continue-on-error: true | ||
- id: logs | ||
name: Upload Logs | ||
run: ./tools/github/checkAndUploadLogs.sh ${{ env.TEST_SUITE }} | ||
- name: Slack Notification | ||
run: > | ||
./tools/github/writeOnSlack.sh "[$TEST_SUITE]" | ||
$GH_BUILD: ${{ steps.tests.outcome }} | ||
$'\nbranch:' $GH_BRANCH | ||
$'\nlogs:' ${{ steps.logs.outputs.logs }} | ||
$'\nreport:' ${{ steps.logs.outputs.report }} | ||
- name: Results | ||
run: test "${{ steps.tests.outcome }}" == "success" |
Uh oh!
There was an error while loading. Please reload this page.