Merge pull request #1079 from tharindu1st/bug-fix #255
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | |
# | |
# WSO2 Inc. 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: API Controller Build with Test | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run hostname | |
run: hostname | |
- name: Fix host entry | |
run: sudo echo "127.0.0.1 $(hostname)" | sudo tee -a /etc/hosts | |
- name: Show hosts | |
run: cat /etc/hosts | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libcurl4-openssl-dev | |
- name: Set up Golang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.14 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.11 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
- name: Build | |
run: | | |
cd import-export-cli | |
go vet ./... | |
./build.sh -t apictl.go -v 4.3.0 | |
- name: Start APIM | |
run: | | |
cd import-export-cli/integration/ci-resources | |
./start-apim.sh | |
shell: bash | |
- name: Test | |
run: | | |
cd import-export-cli/integration | |
go test -p 1 -timeout 0 -archive apictl-4.3.0-linux-x64.tar.gz -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... |