Skip to content

Commit 945bfcc

Browse files
committed
ci: add workflow
1 parent bd2bb90 commit 945bfcc

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Go
2+
3+
on: [push]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
environment: test
9+
strategy:
10+
matrix:
11+
go-version: ["1.24.x", "1.25.x"]
12+
13+
steps:
14+
- uses: actions/checkout@v5
15+
- name: Setup Go ${{ matrix.go-version }}
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: ${{ matrix.go-version }}
19+
- name: Display Go version
20+
run: go version
21+
- name: Install dependencies
22+
run: go mod tidy
23+
- name: Run tests
24+
env:
25+
REALDEBRID_API_KEY: ${{ secrets.REALDEBRID_API_KEY }}
26+
run: go test -v ./...
27+
28+
cli-build:
29+
runs-on: ubuntu-latest
30+
needs: test
31+
strategy:
32+
matrix:
33+
go-version: ["1.24.x", "1.25.x"]
34+
35+
steps:
36+
- uses: actions/checkout@v5
37+
- name: Setup Go ${{ matrix.go-version }}
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version: ${{ matrix.go-version }}
41+
- name: Display Go version
42+
run: go version
43+
- name: Install dependencies
44+
run: go mod tidy
45+
- name: Build CLI binary
46+
run: go build -o rd-test ./rd/main.go
47+
- name: Verify CLI binary
48+
run: ./rd-test

0 commit comments

Comments
 (0)