@@ -11,53 +11,94 @@ 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 : Install Go
70
+ uses : actions/setup-go@v5
71
+ with :
72
+ go-version : 1.20.x
73
+
74
+ - name : Checkout code
75
+ uses : actions/checkout@v4
76
+ with :
77
+ path : demoinfocs-golang
78
+
79
+ - name : Checkout CSDA code
80
+ uses : actions/checkout@v4
81
+ with :
82
+ repository : akiver/cs-demo-analyzer
83
+
84
+ - name : Update CSDA mod
85
+ run : |
86
+ - cd cs-demo-analyzer
87
+ - go mod edit -replace github.com/markus-wa/demoinfocs-golang/v4=./demoinfocs-golang
88
+
89
+ - name : Download demos cache file
90
+ run : curl -L -o demos.txt https://gitlab.com/akiver/cs-demos/-/raw/main/demos.txt
91
+
92
+ - name : Restore demos cache
93
+ uses : actions/cache@v4
94
+ id : demos-cache
95
+ with :
96
+ path : cs-demos
97
+ key : demos-${{ hashFiles('demos.txt') }}
98
+
99
+ - name : Download demos
100
+ if : steps.demos-cache.outputs.cache-hit != 'true'
101
+ run : ./download-demos.sh
102
+
103
+ - name : Test
104
+ run : go test ./tests
0 commit comments