浏览代码

chore(CI): bundle before tests

Mustafa ARICI 4 年之前
父节点
当前提交
4a034833e3
共有 1 个文件被更改,包括 31 次插入16 次删除
  1. 31 16
      .github/workflows/go.yml

+ 31 - 16
.github/workflows/go.yml

@@ -8,25 +8,40 @@ on:
 
 jobs:
   test:
-    name: Test
     runs-on: ubuntu-latest
     steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-go@v2
+        with:
+          go-version: '^1'
 
-    - name: Set up Go
-      uses: actions/setup-go@v2
-      with:
-        go-version: "^1"
-      id: go
+      - name: Get the version
+        id: get_version
+        run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
 
-    - name: Check out code
-      uses: actions/checkout@v2
-      
-    - name: Install OpenVPN
-      run: sudo apt-get install -y openvpn
+      - name: Deps
+        run: |
+          sudo apt-get update -y
+          sudo apt install reprepro createrepo rsync -y
+          mkdir -p /tmp/protoc
+          pushd /tmp/protoc
+          wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.7/protoc-3.15.7-linux-x86_64.zip
+          unzip protoc-3.15.7-linux-x86_64.zip
+          popd
+          sudo chmod +x /tmp/protoc/bin/protoc
+          sudo cp /tmp/protoc/bin/protoc /usr/bin/protoc
+          sudo cp -r /tmp/protoc/include/* /usr/local/include/
+          sudo chmod -R 777 /usr/local/include/google
+          sudo apt-get install autoconf automake libtool curl make g++ unzip -y
+          go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
+          go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
+          go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
+          go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
+          go install github.com/kevinburke/go-bindata/go-bindata@latest
+          go install github.com/goreleaser/nfpm/cmd/nfpm@latest
 
-    - name: Get dependencies
-      run: |
-        go get -v -t -d ./...
+      - name: Bundle
+        run: make bundle
 
-    - name: Test
-      run: make test
+      - name: Test
+        run: make test