Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,38 @@
name: Go
on: [push, pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.16"]
go: ["1.19"]
steps:

- name: Set up Go ${{ matrix.go }}
id: go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Check out code
uses: actions/checkout@v1
- name: Get dependencies
run: go get -v -t -d ./...

run: |
go mod tidy
go mod vendor
- name: Test
run: go test -race `go list ./... | grep -v benchmark` -short

run: |
go test -short -race -coverprofile cover.out -covermode=atomic `go list ./... | grep -v benchmark`
go tool cover -func=cover.out
- name: Check code quality
run: |
export PATH=$PATH:$(go env GOPATH)/bin
wget https://github.com/mgechev/revive/releases/download/v1.2.1/revive_1.2.1_Linux_x86_64.tar.gz
wget -nv https://github.com/mgechev/revive/releases/download/v1.2.1/revive_1.2.1_Linux_x86_64.tar.gz
tar xf revive_1.2.1_Linux_x86_64.tar.gz -C /tmp
/tmp/revive -config .revive.toml -formatter friendly -exclude vendor/... $(go list ./...)

- name: Make
run: make dev

- name : Upload artifact
- name : Upload binary
uses: actions/upload-artifact@master
with:
name: ela-ubuntu
name: ela-x86-amd64
path: ela
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ Make sure the [macOS version](https://en.wikipedia.org/wiki/MacOS#Release_histor

```bash
$ uname -srm
Darwin 18.7.0 x86_64
Darwin 21.6.0 x86_64
```

Use [Homebrew](https://brew.sh/) to install Golang 1.16
Use [Homebrew](https://brew.sh/) to install Golang

```bash
$ brew install go@1.16
$ brew install go
```

Check the golang version. Make sure they are the following version number or above.

```bash
$ go version
go version go1.16.5 darwin/amd64
go version go1.19.1 darwin/amd64
```

### 2. Ubuntu Prerequisites
Expand All @@ -40,7 +40,7 @@ Make sure your ubuntu version is 18.04 or later.

```bash
$ cat /etc/issue
Ubuntu 18.04.5 LTS \n \l
Ubuntu 22.04.1 LTS \n \l
```

Install Git.
Expand All @@ -52,8 +52,8 @@ $ sudo apt-get install -y git
Install Go distribution.

```bash
$ curl -O https://golang.org/dl/go1.13.15.linux-amd64.tar.gz
$ tar -xvf go1.13.15.linux-amd64.tar.gz
$ curl -O https://golang.org/dl/go1.19.1.linux-amd64.tar.gz
$ tar -xvf go1.19.1.linux-amd64.tar.gz
$ sudo chown -R root:root ./go
$ sudo mv go /usr/local
$ export GOPATH=$HOME/go
Expand Down