Remove matrix, replace with TxGraph
#1457
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci_unit | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'server/**' | |
- 'pkg/client-sdk/**' | |
- 'common/**' | |
pull_request: | |
branches: | |
- '*' | |
paths: | |
- 'server/**' | |
- 'pkg/client-sdk/**' | |
- 'common/**' | |
jobs: | |
check-go-sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.23.1' | |
- name: Run go work sync | |
run: go work sync | |
- name: Check for changes | |
run: | | |
if [[ -n $(git status --porcelain) ]]; then | |
echo "Changes detected after running go work sync and go mod tidy" | |
git diff | |
exit 1 | |
fi | |
test-server: | |
name: server unit tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./server | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.23.1' | |
- uses: actions/checkout@v3 | |
- name: check linting | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.61 | |
working-directory: ./server | |
args: --timeout 5m | |
- name: check code integrity | |
uses: securego/gosec@master | |
with: | |
args: '-severity high -quiet -exclude=G115 ./...' | |
- name: Run go work sync | |
run: go work sync | |
- name: create pg db | |
run: make pgtest | |
- name: create redis db | |
run: make redis-up | |
- name: unit testing | |
run: make test | |
- name: drop pg db | |
run: make droppgtest | |
- name: drop redis db | |
run: make redis-down | |
test-sdk: | |
name: sdk unit tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./pkg/client-sdk | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.23.1' | |
- uses: actions/checkout@v3 | |
- name: check linting | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.61 | |
working-directory: ./pkg/client-sdk | |
args: --timeout 5m --skip-files=.*_test.go | |
- name: check code integrity | |
uses: securego/gosec@master | |
with: | |
args: '-severity high -quiet -exclude=G115 ./...' | |
- name: Run go work sync | |
run: go work sync | |
- name: unit testing | |
run: make test | |
test-common: | |
name: common unit tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./common | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.23.1' | |
- uses: actions/checkout@v3 | |
- name: check linting | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.61 | |
working-directory: ./common | |
args: --timeout 5m | |
- name: check code integrity | |
uses: securego/gosec@master | |
with: | |
args: '-severity high -quiet -exclude=G115 ./...' | |
- name: Run go work sync | |
run: go work sync | |
- name: unit testing | |
run: make test | |