Skip to content

Commit

Permalink
ci: Drop GoReleaser and Makefile (#196)
Browse files Browse the repository at this point in the history
* Update go.mod

* Update goreleaser

* Update go.sum

* Drop GoReleaser and Makefile

* Fix build workflow

* Rename CodeQL

* Remove dist

* Remove weird ... file

* Rename build to builder
  • Loading branch information
drpaneas committed May 16, 2021
1 parent 7cd131a commit ebc753b
Show file tree
Hide file tree
Showing 18 changed files with 261 additions and 1,392 deletions.
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
commit-message:
prefix: "ci:"

# Maintain Go dependencies
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
commit-message:
prefix: "ci:"
69 changes: 0 additions & 69 deletions .github/workflows/build.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: builder

on:
push:
branches:
- 'master'
pull_request:

jobs:
builder:
name: Building the Project
runs-on: ubuntu-latest
steps:
- name: Checkout out source code
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Set up Go environment
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
- run: go version

- name: Cache Go modules
uses: actions/cache@v2.1.5
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Go imports
uses: Jerome1337/goimports-action@v1.0.2

- name: Go fmt
uses: Jerome1337/gofmt-action@v1.0.4
with:
gofmt-flags: '-l -d'

- name: Go mod tidy
uses: Jerome1337/gomod-action@v1.0.0

- name: Set GCC
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y gcc
- name: Go build
run: go build -o romie
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: "analysis"

on:
push:
Expand All @@ -17,7 +17,7 @@ on:

jobs:
analyze:
name: Analyze
name: Run CodeQL analysis
runs-on: ubuntu-latest

strategy:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: lint
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
jobs:
lint:
name: Run golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up LibGL, Mesa & X11 libraries
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y gcc
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: 'v1.39.0'
39 changes: 0 additions & 39 deletions .github/workflows/gorelease.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- master
jobs:
deploy:
name: Update the website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test

on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:

jobs:
test:
name: "Run unit tests"
runs-on: ubuntu-latest
steps:
- name: Checkout out source code
uses: actions/checkout@v2.3.4

- name: Install GCC
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y gcc
- name: Set up Go environment
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
- run: go version

- name: Go Test
run: go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -run . -timeout 5m

- name: headless test
uses: GabrielBB/xvfb-action@v1
with:
# this is running only on Ubuntu: /usr/bin/xvfb-run --auto-servernum go test -v -race ./...
run: go test -v -race ./...
33 changes: 0 additions & 33 deletions .github/workflows/validate_goreleaser.yml

This file was deleted.

Loading

0 comments on commit ebc753b

Please sign in to comment.