Add pre-commit to CI
This commit is contained in:
parent
901aa8cfd6
commit
349fe504ae
14
.build.yml
14
.build.yml
|
@ -1,10 +1,21 @@
|
||||||
image: alpine/latest
|
image: alpine/latest
|
||||||
packages:
|
packages:
|
||||||
- go
|
- go
|
||||||
|
- python3-dev
|
||||||
tasks:
|
tasks:
|
||||||
- go-get: |
|
- go-get: |
|
||||||
cd hswro-alarm-bot
|
cd hswro-alarm-bot
|
||||||
go get -t
|
go get -t
|
||||||
|
- precommit: |
|
||||||
|
cd hswro-alarm-bot
|
||||||
|
python3 -m venv .venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip3 install pre-commit
|
||||||
|
pre-commit install
|
||||||
|
pre-commit run -a
|
||||||
|
- test: |
|
||||||
|
cd hswro-alarm-bot
|
||||||
|
go test --count=10000
|
||||||
- build-x86_64: |
|
- build-x86_64: |
|
||||||
cd hswro-alarm-bot
|
cd hswro-alarm-bot
|
||||||
env GOOS=linux GOARCH=amd64 go build -o alarm_bot.x86-64
|
env GOOS=linux GOARCH=amd64 go build -o alarm_bot.x86-64
|
||||||
|
@ -20,9 +31,6 @@ tasks:
|
||||||
- build-arm8: |
|
- build-arm8: |
|
||||||
cd hswro-alarm-bot
|
cd hswro-alarm-bot
|
||||||
env GOOS=linux GOARCH=arm64 go build -o alarm_bot.arm8
|
env GOOS=linux GOARCH=arm64 go build -o alarm_bot.arm8
|
||||||
- test: |
|
|
||||||
cd hswro-alarm-bot
|
|
||||||
go test --count=10000
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- hswro-alarm-bot/alarm_bot.x86-64
|
- hswro-alarm-bot/alarm_bot.x86-64
|
||||||
- hswro-alarm-bot/alarm_bot.arm5
|
- hswro-alarm-bot/alarm_bot.arm5
|
||||||
|
|
|
@ -13,3 +13,4 @@ repos:
|
||||||
- id: go-fmt
|
- id: go-fmt
|
||||||
args: [ -w ]
|
args: [ -w ]
|
||||||
- id: go-vet-mod
|
- id: go-vet-mod
|
||||||
|
- id: go-test-repo-mod
|
||||||
|
|
Loading…
Reference in New Issue