Skip to content

Commit

Permalink
Put code in root, add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinwyszynski committed Aug 19, 2023
1 parent 82822ed commit d79cad1
Show file tree
Hide file tree
Showing 24 changed files with 49 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on: [push]

jobs:
deployment:
name: Test the code
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "1.20"

- name: Check formatting using gofmt
run: gofmt -s -l -d .

- name: Lint the code using "golangci-lint"
run: |
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.46.2
./bin/golangci-lint run -v
- name: Test with coverage
run: go test ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
# Go workspace file
go.work
.env
dist
20 changes: 20 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
builds:
- main: ./cmd/lambda
env:
- CGO_ENABLED=0
- GOPRIVATE="github.com/spacelift-io"
mod_timestamp: '{{ .CommitTimestamp }}'
flags: [-trimpath, -v]
goos: [linux]
goarch: [amd64, arm64]
binary: '{{ .ProjectName }}_v{{ .Version }}'

archives:
- format: zip
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'

changelog:
use: github-native

release:
draft: true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d79cad1

Please sign in to comment.