-
-
Notifications
You must be signed in to change notification settings - Fork 313
109 lines (99 loc) · 2.52 KB
/
Copy pathci.yml
File metadata and controls
109 lines (99 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
permissions:
contents: read
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
timeout-minutes: 10
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/setup-go@v6
with:
go-version: 1.25
- uses: actions/checkout@v6
- run: make build
- uses: actions/upload-artifact@v7
with:
name: podsync-${{ matrix.os }}
path: bin/
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/setup-go@v6
with:
go-version: 1.25
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/checkout@v6
- name: Run Web UI tests
run: node --test html/index.test.js
- env:
VIMEO_TEST_API_KEY: ${{ secrets.VIMEO_ACCESS_TOKEN }}
YOUTUBE_TEST_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
run: make test
coverage:
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/setup-go@v6
with:
go-version: 1.25
- uses: actions/checkout@v6
- name: Run tests with coverage
env:
VIMEO_TEST_API_KEY: ${{ secrets.VIMEO_ACCESS_TOKEN }}
YOUTUBE_TEST_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
run: go test -coverprofile=coverage.txt ./...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
checks:
name: Checks
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
# Required: allow read access to the content for analysis.
# See https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#annotations
contents: read
pull-requests: read
steps:
- uses: actions/setup-go@v6
with:
go-version: 1.25
- uses: actions/checkout@v6
- uses: golangci/golangci-lint-action@v9
- name: Go mod
env:
DIFF_PATH: "go.mod go.sum"
run: |
go mod tidy
DIFF=$(git status --porcelain -- $DIFF_PATH)
if [ "$DIFF" ]; then
echo
echo "These files were modified:"
echo
echo "$DIFF"
echo
exit 1
fi