create the CI #1

Open
thinkode wants to merge 38 commits from 6-create-the-ci into develop
9 changed files with 362 additions and 279 deletions

View File

@@ -0,0 +1,46 @@
name: Check software
on: [push]
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: '1.21.4'
cache: true
- name: Install dependencies
run: go mod tidy
- name: Install golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1
- name: Run golangci-lint
run: |
$(go env GOPATH)/bin/golangci-lint run
# - name: Build
# run: go build -v ./...
# - name: Run tests with race detector
# run: go test -v -race ./...
# - name: Run tests and generate coverage report
# run: go test -v -coverprofile=coverage.out ./...
# - name: Display coverage
# run: go tool cover -func=coverage.out
# - name: Upload coverage report
# uses: actions/upload-artifact@v3
# with:
# name: coverage-report
# path: coverage.out

33
Taskfile.yml Normal file
View File

@@ -0,0 +1,33 @@
version: '3'
vars:
# Get the application name
repo_name:
sh: basename `git config --get remote.origin.url` .git
repo_version:
sh: |
tag=$(git describe --tags --abbrev=0 2>/dev/null || true)
if [ -z "$tag" ]; then
git rev-parse HEAD
else
echo $tag
fi
tasks:
# Installing the dependencies to develop dmxconnect
install:
cmds:
- echo "Installing dependencies to contribute to {{.repo_name}}..."
silent: true
# Running the application
run:
cmds:
- echo "Running {{.repo_name}}..."
silent: true
# Building the application
build:
cmds:
- echo "Generating {{.repo_name}}_v{{.repo_version}}.deb ..."
silent: true

4
go.mod
View File

@@ -1,6 +1,8 @@
module changeme
go 1.20
go 1.21
toolchain go1.21.4
require github.com/wailsapp/wails/v2 v2.9.1

2
go.sum
View File

@@ -49,6 +49,7 @@ github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXn
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
@@ -90,3 +91,4 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=