-
Notifications
You must be signed in to change notification settings - Fork 19
35 lines (30 loc) · 980 Bytes
/
main.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
name: Backend CI/CD
on:
pull_request:
branches:
- main
jobs:
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Read Config
run: |
echo "${{ secrets.CONFIG_BASE }}" \
| base64 -d > config.json
- name: Run Unit Tests
timeout-minutes: 20
run: go test -v -run ./...
- name: Lint CJK Chars
run: |
find . -type f -exec file {} + \
| grep -vE '.*\.csv:|.*\.log:' \
| grep text \
| cut -d: -f1 \
| xargs perl -Mopen=locale -ne 'print "$ARGV:$.\t$_" if /[\x{4e00}-\x{9fa5}\x{3400}-\x{4DBF}\x{20000}-\x{2A6DF}\x{2A700}-\x{2B73F}\x{2B740}-\x{2B81F}\x{2B820}-\x{2CEAF}\x{2CEB0}-\x{2EBEF}\x{30000}-\x{3134F}\x{F900}-\x{FAFF}\x{2F800}-\x{2FA1F}]/'