experiment (#12)

Reviewed-on: #12
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-11-14 22:09:08 +00:00
committed by phoenix
parent 59362806e5
commit a1c197cb06
9 changed files with 143 additions and 109 deletions
+21 -17
View File
@@ -19,23 +19,27 @@ jobs:
go-version: '1.25.3' # You can specify a specific version or 'stable'
- name: Build
run: make build
run: |
echo "Initializing config"
mkdir -p ~/.ssh
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/textsender_models_deploy_key
chmod 600 ~/.ssh/textsender_models_deploy_key
ssh-keyscan ${{ vars.MY_HOST }} >> ~/.ssh/known_hosts
eval $(ssh-agent -s)
ssh-add -v ~/.ssh/textsender_models_deploy_key
go env -w GOPRIVATE='${{ secrets.GIT_HOST_ROOT }}'
echo "Creating local .gitconfig"
touch ~/.gitconfig
cat > ~/.gitconfig << "EOF"
[url "ssh://git@${{ secrets.GIT_HOST_ROOT }}"]
insteadOf = https://${{ secrets.GIT_HOST_ROOT }}
EOF
echo "Building binary"
make build
- name: Test
run: go test -v ./...
- name: Run gofmt (optional)
# Uncomment to check code formatting with gofmt
run: |
if [ -n "$(gofmt -l.)" ]; then
echo "Go code is not formatted. Please run 'gofmt -w.' to fix it."
exit 1
fi
- name: Run golint (optional)
# Uncomment to check code style with golint
run: |
if [ -n "$(golint./...)" ]; then
echo "Go code has style issues. Please run 'golint./...' to see them."
exit 1
fi