-
-
Notifications
You must be signed in to change notification settings - Fork 289
57 lines (55 loc) · 1.39 KB
/
go-ci.yml
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
name: Go Test
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 5'
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
macos:
strategy:
matrix:
os: [macos-latest]
go: ['1.19', '1.20', '1.21']
runs-on: ${{ matrix.os }}
name: macOS Go${{ matrix.go }} on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install tesseract
run: brew install tesseract
- name: Install pkg
run: go get -u -v -t ./...
- name: Test
run: go test -v -cover ./...
coverage:
runs-on: ubuntu-latest
name: Ubuntu for Coverage
needs: macos
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Go
uses: actions/setup-go@v4
with:
go-version: '1.18'
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y \
libtesseract-dev \
libleptonica-dev \
tesseract-ocr-eng
- name: Coverage Test
run: go test -v -cover -race -coverprofile=coverage -covermode=atomic
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
file: ./coverage
token: ${{ secrets.CODECOV_TOKEN }}