Skip to content

Commit

Permalink
cicd: test on pull requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
arshamalh committed Nov 24, 2023
1 parent 0433c36 commit 60d7feb
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Go Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21.0

- name: Install dependencies
run: go mod download

- name: Run tests
run: go test -v ./...

- name: Check code style
run: gofmt -l -s $(find . -type f -name '*.go' -not -path "./vendor/*")
9 changes: 9 additions & 0 deletions 2do.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
- [ ] Remove previous messages buttons (when they are not required)
- [ ] Handle callback queries to show messages, e.g. for remove.
- Helper: &telebot.CallbackResponse{Text: fmt.Sprint(ctx.Data(), "removed!")}
- [ ] Add github actions security check with gosec (should not exit with status 1 in case of non-critical issues)
```yaml
- name: Gosec Security Scanner
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/securego/gosec/v2/cmd/gosec@latest
echo "[gosec]\n severity = \"medium\"\n" > .gosec.toml
gosec ./...
```
- [ ] Load yaml config
- [ ] Implement web hook and let the user decide for it.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/arshamalh/dockeroller

go 1.19
go 1.21.0

require (
github.com/docker/docker v20.10.17+incompatible
Expand Down

0 comments on commit 60d7feb

Please sign in to comment.