-
Notifications
You must be signed in to change notification settings - Fork 316
60 lines (48 loc) · 1.67 KB
/
ci.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
name: SODA API CI Build
on: [push, pull_request, workflow_dispatch]
jobs:
build:
env:
GO111MODULE: on
TARGET: amd64
strategy:
matrix:
go-version: [1.12.x, 1.13.x]
os: [ubuntu-16.04]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout project
uses: actions/checkout@v2
- name: Symlink source into GOPATH for api
run: |
mkdir -p $(go env GOPATH)/src/github.com/sodafoundation/api
sudo ln -s $(pwd) $(go env GOPATH)/src/github.com/sodafoundation/api
- name: Create the Folder structure and symlink to opensds (TODO:-Fix vendor module from opensds to sodafoundation)
run: |
echo "Check current dir: \n"
pwd
echo "GOPATH: $(go env GOPATH)"
sudo mkdir -p $(go env GOPATH)/src/github.com/opensds
sudo ln -s $(go env GOPATH)/src/github.com/sodafoundation $(go env GOPATH)/src/github.com/opensds
- name: Install Pre-requisites
run: |
sudo apt-get update
sudo apt-get install -y build-essential gcc
sudo apt-get install -y librados-dev librbd-dev
sudo apt-get install -y lvm2 tgt open-iscsi
sudo docker pull p1c2u/openapi-spec-validator
- name: Build the binaries
run: |
make osdsapiserver
make osdsctl
- name: Run CI scripts for Testing
run: ./install/CI/coverage && ./install/CI/test
- name: After success run Codecov Coverage tool.
uses: codecov/codecov-action@v1
- name: Clean up the build
run: |
make clean