1053e27dc5
* upgrade the actions for checkout and golang * delete the unstale windows golanglint-ci * use relative path * Update golangci-lint setup for Windows workflow * Remove Windows smoke test workflow
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: Reusable smoke test
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
run_on:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
smoke_test:
|
|
name: Smoke test
|
|
runs-on: ${{ inputs.run_on }}
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v5
|
|
- name: Setup Go
|
|
id: go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: ^1.25
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
install-mode: goinstall
|
|
version: latest
|
|
- name: Install
|
|
run: make install
|
|
- name: Check rebuild
|
|
id: check_rebuild
|
|
working-directory: ./smoke_test/check_rebuild
|
|
run: |
|
|
nohup air > nohup.out 2> nohup.err < /dev/null &
|
|
sleep 15
|
|
echo "" >> main.go
|
|
sleep 5
|
|
cat nohup.out
|
|
grep "running" nohup.out | wc -l | if [ "$(cat -)" -eq "2" ]; then echo "::set-output name=value::PASS"; else echo "::set-output name=value::FAIL"; fi
|
|
- uses: nick-invision/assert-action@v2
|
|
with:
|
|
expected: "PASS"
|
|
actual: ${{ steps.check_rebuild.outputs.value }}
|