This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (54 loc) · 2.42 KB
/
run-metalgateway-functional-tests.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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Execute functional tests for MetalGateway related workflows
on:
workflow_call:
secrets:
token:
description: 'API token key for tests'
required: true
project_uuid:
description: 'UUID of project to perform tests'
required: true
workflow_dispatch:
inputs:
metro:
description: 'metro code where you want to deploy the metal gateway'
default: 'DA'
required: true
privateIpv4SubnetSize:
description: 'private ipv4 subnet size'
default: '16'
required: true
vxlan:
description: 'vxlan id of associated vlan [WARNING: the test will delete the vlan even if pre-provisioned, specify an unused vxlan id]'
default: '100'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Run equinix metal-java make
run: make generate
- name: Install equinix client
working-directory: ./equinix-openapi-metal
run: mvn clean install --file pom.xml
- name: Set env parameters amd create metalgateway-test props file
run: |
echo "metro=${{ github.event.inputs.metro }}" > equinix-functional-test/src/test/resources/metalgateway-test.properties
echo -e "\nprivateIpv4SubnetSize=${{ github.event.inputs.privateIpv4SubnetSize }}" >> equinix-functional-test/src/test/resources/metalgateway-test.properties
echo -e "\nvxlan=${{ github.event.inputs.vxlan }}" >> equinix-functional-test/src/test/resources/metalgateway-test.properties
echo `cat equinix-functional-test/src/test/resources/metalgateway-test.properties`
- name: Run functional tests for MetalGatewayOperator.
working-directory: ./equinix-functional-test
run: mvn clean test -Dtest=com.equinix.test.functional.TestMetalGatewayOperator.java --file pom.xml
env:
FUNCTIONAL_TEST_TOKEN: ${{ secrets.token }}
FUNCTIONAL_TEST_PROJECT_UUID: ${{ secrets.project_uuid }}