Skip to content

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

Merged
merged 34 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2964ff0
github action initial commit
michele-sciabarra Dec 8, 2022
e2177d3
fix blank
michele-sciabarra Dec 8, 2022
5aa489a
debug
michele-sciabarra Dec 8, 2022
57f76fd
fix push
michele-sciabarra Dec 8, 2022
3bdc6cd
fix java
michele-sciabarra Dec 8, 2022
f400f1e
add setup
michele-sciabarra Dec 8, 2022
44d4d24
triggering build
michele-sciabarra Dec 8, 2022
0c8993a
run unit test
michele-sciabarra Dec 8, 2022
906b1a0
ooops
michele-sciabarra Dec 8, 2022
5c421d1
updating debugAction
michele-sciabarra Dec 8, 2022
1408f81
waitifdebug
michele-sciabarra Dec 8, 2022
fc4212d
fix cleanup
michele-sciabarra Dec 8, 2022
880ab52
final test
michele-sciabarra Dec 8, 2022
3150456
disable ngrok
michele-sciabarra Dec 8, 2022
b1534d0
reworked the PR - multiple jobs and slack
michele-sciabarra Dec 9, 2022
f8cec72
split in multiple build
michele-sciabarra Dec 9, 2022
0da4b9f
github actions updated
michele-sciabarra Dec 11, 2022
fe8cf67
scancode fixes
michele-sciabarra Dec 12, 2022
00308f9
forcing a corresponding version of jdk in ci and docker image and ren…
michele-sciabarra Dec 12, 2022
72c5b19
more fixes - only one test failing against 1.0.0
michele-sciabarra Dec 13, 2022
e699537
finally passing all the tests on 1.0.0
michele-sciabarra Dec 13, 2022
69be259
restored master variables
michele-sciabarra Dec 14, 2022
e16ad25
restored more master files
michele-sciabarra Dec 14, 2022
268730f
triggered on push and pull request
michele-sciabarra Dec 14, 2022
bfb71a2
unit test too
michele-sciabarra Dec 14, 2022
be2b928
wskadmin fixes
michele-sciabarra Dec 14, 2022
fcd7a84
improve message
michele-sciabarra Dec 14, 2022
8914674
dummy enabled
michele-sciabarra Dec 14, 2022
69a8043
better git message
michele-sciabarra Dec 14, 2022
5e47a4d
cleanup the log messages
michele-sciabarra Dec 14, 2022
44eb282
unnecessary change to master - even if beneficial
michele-sciabarra Dec 14, 2022
7fbcb1b
improved messages (and a test disabled)
michele-sciabarra Dec 15, 2022
6e37559
reverting commented test
michele-sciabarra Dec 16, 2022
9647cdc
get rid of DummyKO no more needed
michele-sciabarra Dec 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions .github/workflows/0-on-demand.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# 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
## TODO
#- Performance
## Uncomment those to debug the build
- Dummy
- DummyKO

env:
# openwhisk env
TEST_SUITE: ${{ inputs.test_suite }}
JAVA_DISTRO: adopt-openj9
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
S3_LOG_BUCKET: ${{ secrets.S3_LOG_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}

# (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 }}

# 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
$'\nlogurl:' ${{ steps.logs.outputs.logurl }}
- 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"
70 changes: 70 additions & 0 deletions .github/workflows/1-unit.yaml
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: '*'
# build on pull requests
pull_request:

env:
# openwhisk env
TEST_SUITE: Unit
JAVA_DISTRO: adopt-openj9
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
S3_LOG_BUCKET: ${{ secrets.S3_LOG_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
$'\nlogurl:' ${{ steps.logs.outputs.logurl }}
- name: Results
run: test "${{ steps.tests.outcome }}" == "success"
70 changes: 70 additions & 0 deletions .github/workflows/2-system.yaml
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: '*'
# build on pull requests
pull_request:

env:
# openwhisk env
TEST_SUITE: System
JAVA_DISTRO: adopt-openj9
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
S3_LOG_BUCKET: ${{ secrets.S3_LOG_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
$'\nlogurl:' ${{ steps.logs.outputs.logurl }}
- name: Results
run: test "${{ steps.tests.outcome }}" == "success"
70 changes: 70 additions & 0 deletions .github/workflows/3-multi-runtime.yaml
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: '*'
# build on pull requests
pull_request:

env:
# openwhisk env
TEST_SUITE: MultiRuntime
JAVA_DISTRO: adopt-openj9
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
S3_LOG_BUCKET: ${{ secrets.S3_LOG_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
$'\nlogurl:' ${{ steps.logs.outputs.logurl }}
- name: Results
run: test "${{ steps.tests.outcome }}" == "success"
70 changes: 70 additions & 0 deletions .github/workflows/4-standalone.yaml
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: '*'
# build on pull requests
pull_request:

env:
# openwhisk env
TEST_SUITE: Standalone
JAVA_DISTRO: adopt-openj9
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
S3_LOG_BUCKET: ${{ secrets.S3_LOG_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
$'\nlogurl:' ${{ steps.logs.outputs.logurl }}
- name: Results
run: test "${{ steps.tests.outcome }}" == "success"
Loading