File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build backend
22
33on :
4- workflow_call :
5- secrets :
6- SECRET :
7- required : true
84 workflow_dispatch :
95 pull_request :
106 paths :
117 - backend/**
128
13- env :
14- SECRET : ${{ secrets.SECRET }}
15-
169jobs :
1710 build-backend-linux :
1811 name : " Build backend for linux"
1912 runs-on : ubuntu-latest
2013
21- # Runs on alpine because it is easier to staticly link the library
14+ # Runs on alpine because it is easier to statically link the library
2215 container :
2316 image : golang:alpine
2417
3730 working-directory : " ${{env.BACKEND_DIR}}"
3831 run : mkdir ./output
3932
40- - name : " Load secret"
41- working-directory : " ${{env.BACKEND_DIR}}"
42- run : |
43- ./load-secret.sh "$SECRET"
44-
4533 - name : " Build (64 bit)"
4634 working-directory : " ${{env.BACKEND_DIR}}/cmd"
4735 env :
7563 go-version : " 1.21.3"
7664 cache-dependency-path : " ${{env.BACKEND_DIR}}\\ go.sum"
7765
78- - name : " Load secret"
79- working-directory : " ${{env.BACKEND_DIR}}"
80- run : |
81- echo "$env:SECRET" > ".\internal\excel\secret.json"
82- echo "$env:SECRET" > ".\internal\excel_adapter\internals\secret.json"
83- echo "$env:SECRET" > ".\pkg\excel\secret.json"
84- echo "$env:SECRET" > ".\pkg\excel_adapter\internals\secret.json"
85-
8666 - name : " Create output path"
8767 working-directory : " ${{env.BACKEND_DIR}}"
8868 run : mkdir .\output
@@ -127,11 +107,6 @@ jobs:
127107 working-directory : " ${{env.BACKEND_DIR}}"
128108 run : mkdir ./output
129109
130- - name : " Load secret"
131- working-directory : " ${{env.BACKEND_DIR}}"
132- run : |
133- ./load-secret.sh "$SECRET"
134-
135110 - name : " Build (64 bit)"
136111 working-directory : " ${{env.BACKEND_DIR}}/cmd"
137112 env :
Original file line number Diff line number Diff line change 99 - backend/**
1010 workflow_dispatch :
1111
12- env :
13- SECRET : ${{ secrets.SECRET }}
14-
1512jobs :
1613 test-backend :
1714 name : " Test backend"
3532 run : |
3633 sudo apt-get update && sudo apt-get install -y libpcap-dev
3734
38- - name : " Load secret"
39- working-directory : " ${{env.BACKEND_DIR}}"
40- run : |
41- ./load-secret.sh "$SECRET"
42-
4335 - name : Test with Go
4436 working-directory : " ${{env.BACKEND_DIR}}"
4537 run : go test -v -timeout 30s ./...
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments