@@ -11,53 +11,104 @@ jobs:
1111 REVIEWDOG_GITHUB_API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1212
1313 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
1818
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
2323
24- - name : Checkout code
25- uses : actions/checkout@v2
24+ - name : Checkout code
25+ uses : actions/checkout@v4
2626
27- - name : Download Go Deps
28- run : go mod download
27+ - name : Download Go Deps
28+ run : go mod download
2929
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
3434
35- # Install interface generator
36- go install github.com/vburenin/[email protected] 35+ # Install interface generator
36+ go install github.com/vburenin/[email protected] 3737
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
4141
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
4444
45- - name : Build
46- run : scripts/build.sh
45+ - name : Build
46+ run : scripts/build.sh
4747
48- - name : Check Generated Code
49- run : scripts/check-interfaces-generated.sh
48+ - name : Check Generated Code
49+ run : scripts/check-interfaces-generated.sh
5050
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
5454
55- - name : Race Tests
56- run : scripts/race-tests.sh
55+ - name : Race Tests
56+ run : scripts/race-tests.sh
5757
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 repo
70+ uses : actions/checkout@v4
71+ with :
72+ path : demoinfocs-golang
73+
74+ - name : Checkout CSDA repo
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+ cache-dependency-path : cs-demo-analyzer/go.sum
86+
87+ - name : Update CSDA mod
88+ run : |
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