This repository has been archived by the owner on Jan 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (79 loc) · 2.9 KB
/
test.yml
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
name: Test launch_ros_sandbox
on:
pull_request:
push:
branches:
- master
schedule:
# Run every hour, to help detect flakiness and
# broken external dependencies.
- cron: '0 * * * *'
jobs:
build_and_test_macOS:
runs-on: macOS-latest
steps:
- uses: ros-tooling/setup-ros@v0.1
- uses: ros-tooling/action-ros-ci@v0.2
with:
package-name: launch_ros_sandbox
target-ros2-distro: rolling
vcs-repo-file-url: https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
- uses: actions/upload-artifact@v1
with:
name: colcon-logs-macOS
path: ros_ws/log
build_and_test_ubuntu:
runs-on: ubuntu-latest
container:
image: rostooling/setup-ros-docker:ubuntu-focal-latest
steps:
- uses: ros-tooling/action-ros-ci@v0.2
with:
package-name: launch_ros_sandbox
target-ros2-distro: rolling
- uses: codecov/codecov-action@v1.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ros_ws/src/launch_ros_sandbox/coverage.xml
flags: unittests
name: codecov-umbrella
# codecov sometimes fail to upload the report, this
# leads to flaky build failures.
# In the future, it may be interesting to have a separate
# job for coverage reports with a higher tolerance for failure
# and/or add retry logic to the action.
fail_ci_if_error: false
- uses: actions/upload-artifact@v1
with:
name: colcon-logs-ubuntu
path: ros_ws/log
log_workflow_status_to_cloudwatch:
runs-on: ubuntu-latest
container:
image: ubuntu:bionic
needs:
- build_and_test_macOS
- build_and_test_ubuntu
if: always() # run even if the dependent jobs have failed to log failures
# Allow build reports to fail on pull requests.
# When a contribution is made on a fork, the secrets will not be available,
# and this step will be failing. This is acceptable.
# On the other end, we want to be notified if this happens on merge, or
# on schedule.
continue-on-error: ${{ github.event_name == 'pull_request'}}
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- uses: ros-tooling/action-cloudwatch-metrics@0.0.5
with:
# Checks if any of the jobs have failed.
#
# needs.*.result is returns the list of all success statuses as an
# array, i.e. ['success', 'failure, 'success']
# join() converts the array to a string 'successfailuresuccess'
# contains() checks whether the string contains failure
metric-value: ${{ ! contains(join(needs.*.result, ''), 'failure') && ! contains(join(needs.*.result, ''), 'cancelled') }}