Skip to content

Commit f731b09

Browse files
authored
Merge branch 'master' into feat/build
2 parents 16876e4 + db960aa commit f731b09

7 files changed

Lines changed: 99 additions & 123 deletions

File tree

‎.circleci/conditional_config.yml‎

Lines changed: 0 additions & 70 deletions
This file was deleted.

‎.circleci/config.yml‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎.github/workflows/test-app.yml‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Test App
2+
3+
on:
4+
push:
5+
paths: ["cmd/**", "internal/**", "server/**", "test/**", "main.go", "go.mod", "go.sum"]
6+
branches-ignore: ["release/*", "nightly"]
7+
tags-ignore: ["v*"]
8+
pull_request:
9+
paths: ["cmd/**", "internal/**", "server/**", "test/**", "main.go", "go.mod", "go.sum"]
10+
branches-ignore: ["release/*", "nightly"]
11+
12+
env:
13+
REPORT_DIR: "/tmp/test-reports"
14+
15+
jobs:
16+
test_app:
17+
name: Test Go on ${{ matrix.os }}
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
os: [ubuntu-latest, macos-latest]
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Setup Go
28+
uses: actions/setup-go@v5
29+
with:
30+
go-version-file: go.mod
31+
cache: false # https://github.com/actions/setup-go/issues/483
32+
33+
- id: go-vars
34+
name: Get Go variables for cache
35+
run: |
36+
echo "GOCACHE=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
37+
echo "GOMODCACHE=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
38+
39+
- name: Cache go modules
40+
uses: actions/cache@v4
41+
with:
42+
path: |
43+
${{ steps.go-vars.outputs.GOCACHE }}
44+
${{ steps.go-vars.outputs.GOMODCACHE }}
45+
key: go-test-${{ runner.os }}-${{ hashFiles('**/go.mod') }}
46+
restore-keys: |
47+
go-test-${{ runner.os }}
48+
49+
- name: Install tools
50+
run: go install gotest.tools/gotestsum@latest
51+
52+
- name: Download Go modules
53+
run: go mod download
54+
55+
- name: Run tests
56+
run: |
57+
mkdir -p $REPORT_DIR
58+
gotestsum --junitfile $REPORT_DIR/unit-tests.xml --jsonfile $REPORT_DIR/unit-tests.json -- -coverprofile=$REPORT_DIR/coverage.out ./...
59+
60+
- name: Upload test results
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: Go-Test-Results-${{ runner.os }}
64+
path: ${{ env.REPORT_DIR }}
65+
66+
- if: matrix.os == 'ubuntu-latest'
67+
name: Upload coverage to Codecov
68+
uses: codecov/codecov-action@v4
69+
with:
70+
flags: go
71+
file: ${{ env.REPORT_DIR }}/coverage.out
72+
token: ${{ secrets.CODECOV_TOKEN }}

‎.github/workflows/test-docs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Test Docs
22

33
on:
44
push:
5-
branches: ["*", "!release/*", "!nightly"]
65
paths: ["docs/**"]
6+
branches-ignore: ["release/*", "nightly"]
77
tags-ignore: ["v*"]
88
pull_request:
99
paths: ["docs/**"]
10-
branches: ["*", "!release/*", "!nightly"]
10+
branches-ignore: ["release/*", "nightly"]
1111

1212
jobs:
1313
test_docs:

‎.github/workflows/test-frontend.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ name: Test Frontend
22

33
on:
44
push:
5-
branches: ["*", "!release/*", "!nightly"]
65
paths: ["ui/**"]
6+
branches-ignore: ["release/*", "nightly"]
77
tags-ignore: ["v*"]
88
pull_request:
99
paths: ["ui/**"]
10-
branches: ["*", "!release/*", "!nightly"]
10+
branches-ignore: ["release/*", "nightly"]
1111

1212
jobs:
1313
test_ui:
1414
strategy:
15+
fail-fast: false
1516
matrix:
1617
node: [18, 20]
1718
os: [ubuntu-latest, windows-latest]

‎go.mod‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/artalkjs/artalk/v2
33
go 1.22.7
44

55
require (
6+
github.com/adrg/xdg v0.5.0
67
github.com/allegro/bigcache/v3 v3.1.0
78
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de
89
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
@@ -20,7 +21,7 @@ require (
2021
github.com/gofiber/swagger v1.1.0
2122
github.com/golang-jwt/jwt v3.2.2+incompatible
2223
github.com/iancoleman/strcase v0.3.0
23-
github.com/jedib0t/go-pretty/v6 v6.5.9
24+
github.com/jedib0t/go-pretty/v6 v6.6.0
2425
github.com/jeremywohl/flatten v1.0.1
2526
github.com/knadh/koanf v1.5.0
2627
github.com/lionsoul2014/ip2region/binding/golang v0.0.0-20240510055607-89e20ab7b6c6
@@ -36,7 +37,7 @@ require (
3637
github.com/steambap/captcha v1.4.1
3738
github.com/stretchr/testify v1.9.0
3839
github.com/swaggo/swag v1.16.3
39-
github.com/tidwall/gjson v1.17.3
40+
github.com/tidwall/gjson v1.18.0
4041
github.com/vmihailenco/msgpack v4.0.4+incompatible
4142
github.com/yuin/goldmark v1.7.4
4243
go.uber.org/zap v1.27.0
@@ -56,13 +57,12 @@ require (
5657
)
5758

5859
require (
59-
cloud.google.com/go/compute/metadata v0.5.1 // indirect
60+
cloud.google.com/go/compute/metadata v0.5.2 // indirect
6061
filippo.io/edwards25519 v1.1.0 // indirect
6162
github.com/ClickHouse/ch-go v0.62.0 // indirect
62-
github.com/ClickHouse/clickhouse-go/v2 v2.28.3 // indirect
63+
github.com/ClickHouse/clickhouse-go/v2 v2.29.0 // indirect
6364
github.com/KyleBanks/depth v1.2.1 // indirect
6465
github.com/VividCortex/ewma v1.2.0 // indirect
65-
github.com/adrg/xdg v0.5.0 // indirect
6666
github.com/andybalholm/brotli v1.1.0 // indirect
6767
github.com/aymerick/douceur v0.2.0 // indirect
6868
github.com/beorn7/perks v1.0.1 // indirect
@@ -101,7 +101,7 @@ require (
101101
github.com/jinzhu/inflection v1.0.0 // indirect
102102
github.com/jinzhu/now v1.1.5 // indirect
103103
github.com/josharian/intern v1.0.0 // indirect
104-
github.com/klauspost/compress v1.17.9 // indirect
104+
github.com/klauspost/compress v1.17.10 // indirect
105105
github.com/lestrrat-go/backoff/v2 v2.0.8 // indirect
106106
github.com/lestrrat-go/blackmagic v1.0.2 // indirect
107107
github.com/lestrrat-go/httpcc v1.0.1 // indirect
@@ -127,7 +127,7 @@ require (
127127
github.com/pmezard/go-difflib v1.0.0 // indirect
128128
github.com/prometheus/client_golang v1.20.4 // indirect
129129
github.com/prometheus/client_model v0.6.1 // indirect
130-
github.com/prometheus/common v0.59.1 // indirect
130+
github.com/prometheus/common v0.60.0 // indirect
131131
github.com/prometheus/procfs v0.15.1 // indirect
132132
github.com/rivo/uniseg v0.4.7 // indirect
133133
github.com/segmentio/asm v1.2.0 // indirect
@@ -143,7 +143,7 @@ require (
143143
github.com/ulikunitz/xz v0.5.12 // indirect
144144
github.com/utahta/go-linenotify v0.5.0 // indirect
145145
github.com/valyala/bytebufferpool v1.0.0 // indirect
146-
github.com/valyala/fasthttp v1.55.0 // indirect
146+
github.com/valyala/fasthttp v1.56.0 // indirect
147147
github.com/valyala/tcplisten v1.0.0 // indirect
148148
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
149149
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect

‎go.sum‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
22
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
3-
cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs=
4-
cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k=
3+
cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo=
4+
cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k=
55
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
66
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
77
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M=
@@ -31,8 +31,8 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1/go.mod h1:wP83
3131
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
3232
github.com/ClickHouse/ch-go v0.62.0 h1:eXH0hytXeCEEZHgMvOX9IiW7wqBb4w1MJMp9rArbkrc=
3333
github.com/ClickHouse/ch-go v0.62.0/go.mod h1:uzso52/PD9+gZj7tL6XAo8/EYDrx7CIwNF4c6PnO6S0=
34-
github.com/ClickHouse/clickhouse-go/v2 v2.28.3 h1:SkFzPULX6nzgfNZd1YD1XTECivjTMrCtD09ZPKcVLFQ=
35-
github.com/ClickHouse/clickhouse-go/v2 v2.28.3/go.mod h1:vzn73hp+3JwxtFU4RjPCQ7r6fP2pMKVwdi8E1/Tkua8=
34+
github.com/ClickHouse/clickhouse-go/v2 v2.29.0 h1:Dj1w59RssRyLgGHXtYaWU0eIM1pJsu9nGPi/btmvAqw=
35+
github.com/ClickHouse/clickhouse-go/v2 v2.29.0/go.mod h1:bLookq6qZJ4Ush/6tOAnJGh1Sf3Sa/nQoMn71p7ZCUE=
3636
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
3737
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
3838
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
@@ -325,8 +325,8 @@ github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nD
325325
github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg=
326326
github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs=
327327
github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
328-
github.com/jedib0t/go-pretty/v6 v6.5.9 h1:ACteMBRrrmm1gMsXe9PSTOClQ63IXDUt03H5U+UV8OU=
329-
github.com/jedib0t/go-pretty/v6 v6.5.9/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
328+
github.com/jedib0t/go-pretty/v6 v6.6.0 h1:wmZVuAcEkZRT+Aq1xXpE8IGat4vE5WXOMmBpbQqERXw=
329+
github.com/jedib0t/go-pretty/v6 v6.6.0/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
330330
github.com/jeremywohl/flatten v1.0.1 h1:LrsxmB3hfwJuE+ptGOijix1PIfOoKLJ3Uee/mzbgtrs=
331331
github.com/jeremywohl/flatten v1.0.1/go.mod h1:4AmD/VxjWcI5SRB0n6szE2A6s2fsNHDLO0nAlMHgfLQ=
332332
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
@@ -351,8 +351,8 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8
351351
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
352352
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
353353
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
354-
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
355-
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
354+
github.com/klauspost/compress v1.17.10 h1:oXAz+Vh0PMUvJczoi+flxpnBEPxoER1IaAnU/NMPtT0=
355+
github.com/klauspost/compress v1.17.10/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
356356
github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs=
357357
github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs=
358358
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -497,8 +497,8 @@ github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQy
497497
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
498498
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
499499
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
500-
github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0=
501-
github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0=
500+
github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA=
501+
github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
502502
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
503503
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
504504
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
@@ -570,8 +570,8 @@ github.com/tcnksm/go-gitconfig v0.1.2 h1:iiDhRitByXAEyjgBqsKi9QU4o2TNtv9kPP3RgPg
570570
github.com/tcnksm/go-gitconfig v0.1.2/go.mod h1:/8EhP4H7oJZdIPyT+/UIsG87kTzrzM4UsLGSItWYCpE=
571571
github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM=
572572
github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog=
573-
github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94=
574-
github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
573+
github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=
574+
github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
575575
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
576576
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
577577
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
@@ -585,8 +585,8 @@ github.com/utahta/go-linenotify v0.5.0 h1:E1tJaB/XhqRY/iz203FD0MaHm10DjQPOq5/Mem
585585
github.com/utahta/go-linenotify v0.5.0/go.mod h1:KsvBXil2wx+ByaCR0e+IZKTbp4pDesc7yjzRigLf6pE=
586586
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
587587
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
588-
github.com/valyala/fasthttp v1.55.0 h1:Zkefzgt6a7+bVKHnu/YaYSOPfNYNisSVBo/unVCf8k8=
589-
github.com/valyala/fasthttp v1.55.0/go.mod h1:NkY9JtkrpPKmgwV3HTaS2HWaJss9RSIsRVfcxxoHiOM=
588+
github.com/valyala/fasthttp v1.56.0 h1:bEZdJev/6LCBlpdORfrLu/WOZXXxvrUQSiyniuaoW8U=
589+
github.com/valyala/fasthttp v1.56.0/go.mod h1:sReBt3XZVnudxuLOx4J/fMrJVorWRiWY2koQKgABiVI=
590590
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
591591
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
592592
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=

0 commit comments

Comments
 (0)