-
-
Notifications
You must be signed in to change notification settings - Fork 35
executable file
·128 lines (99 loc) · 3.23 KB
/
build-test.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
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Build & Test
on:
workflow_dispatch:
repository_dispatch:
types: [build-test]
env:
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
GOPRIVATE: github.com/slingdata-io/*
jobs:
build-test-sling:
if: "! (contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[bump]'))"
runs-on: [self-hosted, linux, ubuntu-20]
timeout-minutes: 40
steps:
- uses: actions/checkout@v2
- uses: myrotvorets/set-commit-status-action@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.sha }}
status: pending
- name: Set up GoLang
uses: actions/setup-go@v3
with:
go-version: "1.22"
cache: false
- name: Load Secrets
uses: flarco/infisical-action@v3
with:
version: 0.28.1
client_id: ${{ secrets.INFISICAL_CLIENT_ID }}
client_secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
- name: Load Secrets (dbio)
uses: flarco/infisical-action@v3
with:
version: 0.28.1
client_id: ${{ secrets.INFISICAL_CLIENT_ID }}
client_secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
path: /dbio
env: dev
- name: Build Binary
run: |
# Prep
bash scripts/ci/prep.linux.sh
# build
bash scripts/ci/build.linux.sh dev
- name: Run Go Tests (sling)
run: |
export DEBUG=''
# Oracle env
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH="$PATH:$ORACLE_HOME/bin"
bash scripts/test.sh
build-test-dbio:
if: "! (contains(github.event.head_commit.message, '[skip ci]') || contains(github.event.head_commit.message, '[bump]'))"
runs-on: [self-hosted, linux, ubuntu-20]
timeout-minutes: 40
steps:
- uses: actions/checkout@v2
- name: Set up GoLang
uses: actions/setup-go@v3
with:
go-version: "1.22"
cache: false
- name: Load Secrets
uses: flarco/infisical-action@v3
with:
version: 0.28.1
client_id: ${{ secrets.INFISICAL_CLIENT_ID }}
client_secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
- name: Load Secrets (dbio)
uses: flarco/infisical-action@v3
with:
version: 0.28.1
client_id: ${{ secrets.INFISICAL_CLIENT_ID }}
client_secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
path: /dbio
env: dev
- name: Build Binary
run: |
# Prep
bash scripts/ci/prep.linux.sh
# build
bash scripts/ci/build.linux.sh dev
- name: Run Go Tests (dbio)
run: |
export DEBUG=''
cd core/dbio
bash scripts/test.sh
build-test-success:
runs-on: [self-hosted, linux, ubuntu-20]
needs: [ build-test-sling, build-test-dbio ]
steps:
- uses: actions/checkout@v2
- uses: myrotvorets/set-commit-status-action@master
if: always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ github.sha }}
status: ${{ job.status }}