diff --git a/.github/workflows/static_check.yaml b/.github/workflows/static_check.yaml new file mode 100644 index 0000000..34ba901 --- /dev/null +++ b/.github/workflows/static_check.yaml @@ -0,0 +1,70 @@ +name: static check +on: [push, pull_request] + +jobs: + imports: + name: Imports + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check + uses: grandcolline/golang-github-actions@v1.1.0 + with: + run: imports + token: ${{ secrets.GITHUB_TOKEN }} + + errcheck: + name: Errcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check + uses: grandcolline/golang-github-actions@v1.1.0 + with: + run: errcheck + flags: "-ignoretests" + token: ${{ secrets.GITHUB_TOKEN }} + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check + uses: grandcolline/golang-github-actions@v1.1.0 + with: + run: lint + token: ${{ secrets.GITHUB_TOKEN }} + + shadow: + name: Shadow + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check + uses: grandcolline/golang-github-actions@v1.1.0 + with: + run: shadow + token: ${{ secrets.GITHUB_TOKEN }} + + staticcheck: + name: StaticCheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check + uses: grandcolline/golang-github-actions@v1.1.0 + with: + run: staticcheck + token: ${{ secrets.GITHUB_TOKEN }} + + sec: + name: Sec + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: check + uses: grandcolline/golang-github-actions@v1.1.0 + with: + run: sec + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml new file mode 100644 index 0000000..d767d56 --- /dev/null +++ b/.github/workflows/unit_tests.yaml @@ -0,0 +1,21 @@ +name: Units tests +on: [push, pull_request] +jobs: + checks: + name: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Setup go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: Run tests + run: go test -v -covermode=count -coverprofile=coverage.out + - name: Convert coverage to lcov + uses: jandelgado/gcov2lcov-action@v1.0.8 + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.github_token }} + path-to-lcov: coverage.lcov diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 72038ec..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: go -sudo: required -dist: xenial -go: - - 1.11.x - - 1.12.x - - 1.13.x -before_install: -- sudo sysctl net.ipv6.conf.lo.disable_ipv6=0 -- go get github.com/mattn/goveralls -- go get golang.org/x/lint/golint -script: -- goveralls -v -- golint -set_exit_status $(go list ./...) diff --git a/README.md b/README.md index 4ba1877..6da76c1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # goftp # -[![Build Status](https://travis-ci.org/jlaffaye/ftp.svg?branch=master)](https://travis-ci.org/jlaffaye/ftp) +[![Units tests](https://github.com/jlaffaye/ftp/actions/workflows/unit_tests.yaml/badge.svg)](https://github.com/jlaffaye/ftp/actions/workflows/unit_tests.yaml) [![Coverage Status](https://coveralls.io/repos/jlaffaye/ftp/badge.svg?branch=master&service=github)](https://coveralls.io/github/jlaffaye/ftp?branch=master) -[![Go ReportCard](http://goreportcard.com/badge/jlaffaye/ftp)](http://goreportcard.com/report/jlaffaye/ftp) +[![Go ReportCard](https://goreportcard.com/badge/jlaffaye/ftp)](http://goreportcard.com/report/jlaffaye/ftp) [![Go Reference](https://pkg.go.dev/badge/github.com/jlaffaye/ftp.svg)](https://pkg.go.dev/github.com/jlaffaye/ftp) A FTP client package for Go