File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test Go
2
+
3
+ # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4
+ on :
5
+ push :
6
+ paths :
7
+ - " .github/workflows/test-go.yml"
8
+ - " Taskfile.yml"
9
+ - " **.go"
10
+ pull_request :
11
+ paths :
12
+ - " .github/workflows/test-go.yml"
13
+ - " Taskfile.yml"
14
+ - " **.go"
15
+ workflow_dispatch :
16
+ repository_dispatch :
17
+
18
+ jobs :
19
+ build :
20
+ runs-on : ubuntu-latest
21
+
22
+ steps :
23
+ - name : Checkout repository
24
+ uses : actions/checkout@v2
25
+
26
+ - name : Install Go
27
+ uses : actions/setup-go@v2
28
+ with :
29
+ go-version : " 1.14"
30
+
31
+ - name : Install Taskfile
32
+ uses : arduino/actions/setup-taskfile@master
33
+ with :
34
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
35
+ version : 3.x
36
+
37
+ - name : Configure Git for go get access to private repo
38
+ run :
git config --global url."https://${{ secrets.REPO_SCOPE_TOKEN }}:[email protected] /".insteadOf "https://github.com/"
39
+
40
+ - name : Build application
41
+ run : task go:build
42
+
43
+ - name : Save binary as workflow artifact
44
+ uses : actions/upload-artifact@v2
45
+ with :
46
+ if-no-files-found : error
47
+ path : libraries-repository-engine
48
+ name : libraries-repository-engine
49
+
50
+ test :
51
+ runs-on : ubuntu-latest
52
+
53
+ steps :
54
+ - name : Checkout repository
55
+ uses : actions/checkout@v2
56
+
57
+ - name : Install Go
58
+ uses : actions/setup-go@v2
59
+ with :
60
+ go-version : " 1.14"
61
+
62
+ - name : Install Taskfile
63
+ uses : arduino/actions/setup-taskfile@master
64
+ with :
65
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
66
+ version : 3.x
67
+
68
+ - name : Configure Git for go get access to private repo
69
+ run :
git config --global url."https://${{ secrets.REPO_SCOPE_TOKEN }}:[email protected] /".insteadOf "https://github.com/"
70
+
71
+ - name : Run tests
72
+ run : task go:test
You can’t perform that action at this time.
0 commit comments