-
Notifications
You must be signed in to change notification settings - Fork 1
118 lines (95 loc) · 2.97 KB
/
bump-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
name: Bump
on:
workflow_dispatch:
push:
branches:
- master
jobs:
bump:
if: "! contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
new_version: ${{ steps.tag_version.outputs.new_version }}
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ github.event.inputs.tag }}
build-test-push:
# runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[no build]')"
runs-on: [self-hosted, Linux]
needs: [bump]
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Set up Node 16
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Cache NPM
id: cache-npm
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Pull & build dbnet-parser
run: |
npm install -g yarn
# Build dbnet-parser
cd .. && rm -rf dbnet-parser
git clone [email protected]:dbnet-io/dbnet-parser.git
cd dbnet-parser && yarn && yarn build && cd -
cd dbnet
- name: Build CLI App
run: |
go mod edit -dropreplace='github.com/flarco/g' go.mod
go mod edit -dropreplace='github.com/flarco/dbio' go.mod
go mod edit -dropreplace='github.com/dbrest-io/dbrest' go.mod
go mod edit -dropreplace='github.com/slingdata-io/sling-cli' go.mod
go mod tidy
bash build.sh
- name: Test CLI
env:
ENVKEY: ${{ secrets.ENVKEY }}
run: |
/__/bin/envkey-source -f --dot-env > .env
# bash scripts/test.sh
- name: Push Docker Test Image
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "$DOCKER_PASSWORD" | docker login -u dbnetio --password-stdin
docker build -f docker/Dockerfile -t dbnetio/dbnet:test .
docker push dbnetio/dbnet:test
deploy-testing:
timeout-minutes: 5
runs-on: self-hosted
needs: [build-test-push]
steps:
- uses: actions/checkout@v2
- name: Deploy to Testing
env:
SSH_SERVER_URL: ${{ secrets.SSH_SERVER_URL }}
run: bash scripts/deploy.testing.sh
test-frontend:
# runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[no test]')"
runs-on: [self-hosted, Linux]
needs: [deploy-testing]
steps:
- name: Test Frontend
uses: omairvaiyani/ghact-uilicious@v1
with:
access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
project: dbNet
tests: "dbnet_test"