From 92a9ad8afd7635122df73f8daa3d8b781336c8a1 Mon Sep 17 00:00:00 2001 From: "Marcel M. Otte" Date: Wed, 12 Apr 2023 10:58:01 +0200 Subject: [PATCH] Copy over github workflows from backive --- .github/workflows/go-release.yml | 31 +++++++++++++++++++++++++ .github/workflows/go.yml | 39 ++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/go-release.yml create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml new file mode 100644 index 0000000..bb27027 --- /dev/null +++ b/.github/workflows/go-release.yml @@ -0,0 +1,31 @@ +name: Go + +on: + release + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.19 + - name: Install GoReleaser + uses: goreleaser/goreleaser-action@v2.7.0 + with: + install-only: true + - name: Go-linter + # You may pin to the exact commit or the version. + # uses: Jerome1337/golint-action@c5d17206a0a436bbf1edb91e314ed084f7c57589 + uses: Jerome1337/golint-action@v1.0.2 + #with: + # Path used by golint command + # golint-path: # optional, default is ./... + - name: Build + run: goreleaser + - name: Test + run: go test -v ./... diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..dee1775 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,39 @@ +name: Go + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: setup runner + run: | + # sudo apt search xorg + sudo apt-get install -y xserver-xorg libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libglvnd-dev libxxf86vm-dev + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.19 + - name: Install GoReleaser + uses: goreleaser/goreleaser-action@v2.7.0 + with: + install-only: true + - name: Go-linter + # You may pin to the exact commit or the version. + # uses: Jerome1337/golint-action@c5d17206a0a436bbf1edb91e314ed084f7c57589 + uses: Jerome1337/golint-action@v1.0.2 + #with: + # Path used by golint command + # golint-path: # optional, default is ./... + - name: Build + run: goreleaser build --snapshot --rm-dist + - name: Test + run: go test -v -cover +