forked from att/sessionOffload
-
Notifications
You must be signed in to change notification settings - Fork 2
115 lines (93 loc) · 3.11 KB
/
main.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
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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: robotframework-tests
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'sessionoffload/v2/**'
- 'sessionoffload/Makefile'
- 'tests/robot/**'
- '.github/workflows/main.yml'
pull_request:
branches: [ main ]
paths:
- 'sessionoffload/v2/**'
- 'sessionoffload/Makefile'
- 'tests/robot/**'
- '.github/workflows/main.yml'
defaults:
run:
working-directory: tests/robot
jobs:
build-protobuf:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@b167a89702b8b5314c104ab9d211b3dcf774f2b1
- name: Build protobufs
run: make
working-directory: sessionoffload
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
path: sessionoffload/v2/gen
retention-days: 1
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3.5.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@b167a89702b8b5314c104ab9d211b3dcf774f2b1
- name: Build protobufs
run: make
working-directory: sessionoffload
- name: Check uncomitted auto generated protobufs
run: git diff --exit-code
working-directory: sessionoffload
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
path: sessionoffload/v2/gen
retention-days: 7
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: 17
distribution: corretto
- uses: actions/setup-python@v4
with:
python-version: '2.x'
architecture: 'x64'
- uses: actions/setup-python@v4
with:
python-version: '3.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install grpcio grpcio-tools pudb
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build with Maven
run: mvn clean install --file pom.xml
- name: Delete output.xml (on Unix-like)
run: |
find $GITHUB_WORKSPACE/tests/robot/target/robotframework-reports -type f -name 'output.xml' -exec rm {} +
if: always()
- name: Archive acceptances test results
uses: actions/upload-artifact@v3
with:
name: robot-results
path: tests/robot/target/robotframework-reports
retention-days: 7
if: always()