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 a7a6cc6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Go Test

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

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- 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/*")

- name: Gosec Security Scanner
uses: securego/gosec@master
with:
args: ./...
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 a7a6cc6

Please sign in to comment.