added server start nohup so that api end test can be conducted #20
This file contains 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: Unit Test | |
on: | |
push: | |
branches: | |
- v.nightly.0 | |
jobs: | |
unittesting: | |
runs-on: ubuntu-latest | |
environment: dev | |
env: | |
DEVICEREG_URL: ${{vars.DEVICEREG_URL}} | |
BOT_BASEURL: ${{ vars.BOT_BASEURL }} | |
BOT_UNAME: ${{ vars.BOT_UNAME }} | |
BOT_TOK: ${{ secrets.BOT_TOK }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
stable: 'false' | |
go-version: '1.22.3' | |
- name: local gin server | |
run: | | |
nohup go run main.go& | |
echo "gin server now running .." | |
- name: unittests | |
run: | | |
go clean --testcache | |
go test -v -timeout 30s -run TestTelegGetMe | |
go test -v -timeout 30s -run TestApi |