Skip to content

Commit a689e17

Browse files
authored
Merge pull request #1315 from sodafoundation/anvithks-gh-ci
[Migrate CI] Added workflow for GitHub actions CI. Deleted travis.yml.
2 parents 7eb8236 + 43a02e2 commit a689e17

3 files changed

Lines changed: 61 additions & 49 deletions

File tree

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: SODA API CI Build
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
env:
8+
GO111MODULE: on
9+
TARGET: amd64
10+
11+
strategy:
12+
matrix:
13+
go-version: [1.12.x, 1.13.x]
14+
os: [ubuntu-16.04]
15+
16+
runs-on: ${{ matrix.os }}
17+
steps:
18+
- name: Set up Go
19+
uses: actions/setup-go@v2
20+
with:
21+
go-version: ${{ matrix.go-version }}
22+
23+
- name: Checkout project
24+
uses: actions/checkout@v2
25+
26+
- name: Symlink source into GOPATH for api
27+
run: |
28+
mkdir -p $(go env GOPATH)/src/github.com/sodafoundation/api
29+
sudo ln -s $(pwd) $(go env GOPATH)/src/github.com/sodafoundation/api
30+
31+
- name: Create the Folder structure and symlink to opensds (TODO:-Fix vendor module from opensds to sodafoundation)
32+
run: |
33+
echo "Check current dir: \n"
34+
pwd
35+
echo "GOPATH: $(go env GOPATH)"
36+
sudo mkdir -p $(go env GOPATH)/src/github.com/opensds
37+
sudo ln -s $(go env GOPATH)/src/github.com/sodafoundation $(go env GOPATH)/src/github.com/opensds
38+
39+
- name: Install Pre-requisites
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install -y build-essential gcc
43+
sudo apt-get install -y librados-dev librbd-dev
44+
sudo apt-get install -y lvm2 tgt open-iscsi
45+
sudo docker pull p1c2u/openapi-spec-validator
46+
47+
- name: Build the binaries
48+
run: |
49+
make osdsapiserver
50+
make osdsctl
51+
52+
- name: Run CI scripts for Testing
53+
run: ./install/CI/coverage && ./install/CI/test
54+
55+
- name: After success run Codecov Coverage tool.
56+
uses: codecov/codecov-action@v1
57+
58+
- name: Clean up the build
59+
run: |
60+
make clean

.travis.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SODA API
22

33
[![Go Report Card](https://goreportcard.com/badge/github.com/sodafoundation/api?branch=master)](https://goreportcard.com/report/github.com/sodafoundation/api)
4-
[![Build Status](https://travis-ci.org/sodafoundation/api.svg?branch=master)](https://travis-ci.org/sodafoundation/api)
4+
[![Build Status](https://github.com/sodafoundation/api/actions/workflows/ci.yml/badge.svg)](https://github.com/sodafoundation/api/actions/workflows/ci.yml)
55
[![codecov.io](https://codecov.io/github/sodafoundation/api/coverage.svg?branch=master)](https://codecov.io/github/sodafoundation/api?branch=master)
66
[![Releases](https://img.shields.io/github/release/sodafoundation/api/all.svg?style=flat-square)](https://github.com/sodafoundation/api/releases)
77
[![LICENSE](https://img.shields.io/github/license/sodafoundation/api.svg?style=flat-square)](https://github.com/sodafoundation/api/blob/master/LICENSE)

0 commit comments

Comments
 (0)