@@ -11,53 +11,104 @@ jobs:
11
11
REVIEWDOG_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
12
13
13
steps :
14
- - name : Install Go
15
- uses : actions/setup-go@v2
16
- with :
17
- go-version : 1.20.x
14
+ - name : Install Go
15
+ uses : actions/setup-go@v5
16
+ with :
17
+ go-version : 1.20.x
18
18
19
- - name : Install Reviewdog
20
- uses : reviewdog/action-setup@v1
21
- with :
22
- reviewdog_version : v0.11.0
19
+ - name : Install Reviewdog
20
+ uses : reviewdog/action-setup@v1
21
+ with :
22
+ reviewdog_version : v0.11.0
23
23
24
- - name : Checkout code
25
- uses : actions/checkout@v2
24
+ - name : Checkout code
25
+ uses : actions/checkout@v4
26
26
27
- - name : Download Go Deps
28
- run : go mod download
27
+ - name : Download Go Deps
28
+ run : go mod download
29
29
30
- - name : Install Tools
31
- run : |
32
- # install 7zip for decompressing test demos
33
- sudo apt-get install -y p7zip-full
30
+ - name : Install Tools
31
+ run : |
32
+ # install 7zip for decompressing test demos
33
+ sudo apt-get install -y p7zip-full
34
34
35
- # Install interface generator
36
- go install github.com/vburenin/ifacemaker@v1.2.1
35
+ # Install interface generator
36
+ go install github.com/vburenin/ifacemaker@v1.2.1
37
37
38
- # Fetch refs for linter
39
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
40
- git fetch
38
+ # Fetch refs for linter
39
+ git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
40
+ git fetch
41
41
42
- # Install golangci-lint
43
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2
42
+ # Install golangci-lint
43
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2
44
44
45
- - name : Build
46
- run : scripts/build.sh
45
+ - name : Build
46
+ run : scripts/build.sh
47
47
48
- - name : Check Generated Code
49
- run : scripts/check-interfaces-generated.sh
48
+ - name : Check Generated Code
49
+ run : scripts/check-interfaces-generated.sh
50
50
51
- - name : Lint Changed Code
52
- run : scripts/lint-changes.sh
53
- continue-on-error : true
51
+ - name : Lint Changed Code
52
+ run : scripts/lint-changes.sh
53
+ continue-on-error : true
54
54
55
- - name : Race Tests
56
- run : scripts/race-tests.sh
55
+ - name : Race Tests
56
+ run : scripts/race-tests.sh
57
57
58
- # Note: We run ALL tests again to get full coverage
59
- # Race tests are too slow and skip the regression set
60
- - name : All Tests + Coverage
61
- run : |
62
- scripts/coverage.sh
63
- bash <(curl -s https://codecov.io/bash)
58
+ # Note: We run ALL tests again to get full coverage
59
+ # Race tests are too slow and skip the regression set
60
+ - name : All Tests + Coverage
61
+ run : |
62
+ scripts/coverage.sh
63
+ bash <(curl -s https://codecov.io/bash)
64
+
65
+ test-csda : # Run tests of CS Demo Analyzer
66
+ runs-on : ubuntu-latest
67
+
68
+ steps :
69
+ - name : Checkout demoinfocs-golang code
70
+ uses : actions/checkout@v4
71
+ with :
72
+ path : demoinfocs-golang
73
+
74
+ - name : Checkout CSDA code
75
+ uses : actions/checkout@v4
76
+ with :
77
+ repository : akiver/cs-demo-analyzer
78
+ path : cs-demo-analyzer
79
+ ref : main
80
+
81
+ - name : Install Go
82
+ uses : actions/setup-go@v5
83
+ with :
84
+ go-version-file : cs-demo-analyzer/go.mod
85
+
86
+ - name : Update CSDA mod
87
+ run : |
88
+ ls -la
89
+ cd cs-demo-analyzer
90
+ go mod edit -replace github.com/markus-wa/demoinfocs-golang/v4=../demoinfocs-golang
91
+ go mod tidy
92
+
93
+ - name : Download demos cache file
94
+ run : |
95
+ cd cs-demo-analyzer
96
+ curl -L -o demos.txt https://gitlab.com/akiver/cs-demos/-/raw/main/demos.txt
97
+
98
+ - name : Restore demos cache
99
+ uses : actions/cache@v4
100
+ id : demos-cache
101
+ with :
102
+ path : cs-demo-analyzer/cs-demos
103
+ key : demos-${{ hashFiles('cs-demo-analyzer/demos.txt') }}
104
+
105
+ - name : Download demos
106
+ if : steps.demos-cache.outputs.cache-hit != 'true'
107
+ run : |
108
+ cd cs-demo-analyzer
109
+ ./download-demos.sh
110
+
111
+ - name : Test
112
+ run : |
113
+ cd cs-demo-analyzer
114
+ go test ./tests
0 commit comments