Skip to content

Commit 61e14ad

Browse files
committed
test
1 parent 11dd3de commit 61e14ad

File tree

1 file changed

+79
-38
lines changed

1 file changed

+79
-38
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,53 +11,94 @@ 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/ifacemaker@v1.2.1
35+
# Install interface generator
36+
go install github.com/vburenin/ifacemaker@v1.2.1
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: 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

Comments
 (0)