-
Notifications
You must be signed in to change notification settings - Fork 28
77 lines (62 loc) · 1.83 KB
/
ci.yml
File metadata and controls
77 lines (62 loc) · 1.83 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Lint
run: |
go fmt ./...
go vet ./...
- name: Test with coverage
run: go test -race -coverprofile=coverage.out -covermode=atomic -count=1 ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.out
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: go build -o onwatch .
menubar-macos:
runs-on: macos-15
name: Menubar macOS
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Compile tagged menubar packages
run: |
go test -tags menubar ./internal/menubar ./internal/web
CGO_LDFLAGS="-framework UniformTypeIdentifiers" go build -tags menubar,desktop,production -o /tmp/onwatch-menubar .
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install E2E dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r tests/e2e/requirements.txt
python -m playwright install chromium
- name: Run menubar browser tests
env:
CGO_LDFLAGS: -framework UniformTypeIdentifiers
ONWATCH_E2E_GO_BUILD_TAGS: menubar,desktop,production
run: |
cd tests/e2e
pytest tests/test_menubar.py -v