From 6178c662cb1306b936dfeecaf231205d31a86bf0 Mon Sep 17 00:00:00 2001 From: "David Muto (pseudomuto)" Date: Sun, 17 Oct 2021 14:54:39 -0400 Subject: [PATCH] Switch from Travis to GitHub actions --- .github/workflows/ci.yaml | 27 ++++++++++++++++++++++++ .travis.yml | 44 --------------------------------------- revive.toml | 3 +++ 3 files changed, 30 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..9618aaee --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,27 @@ +name: CI + +on: + create: ~ + +jobs: + test: + strategy: + matrix: + go: [ '1.17.2' ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Dependencies + run: go get github.com/golang/protobuf/{proto,protoc-gen-go} github.com/haya14busa/goverage + + - name: Tests + run: | + goverage -race -coverprofile=coverage.txt -covermode=atomic + make bench lint + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 01bf2133..00000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: go -sudo: required - -services: - - docker - -env: - global: - - GO111MODULE="on" - - PROTOC_RELEASE="https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip" - - PROTOC_TARGET="${HOME}/protoc" - - PATH="${PROTOC_TARGET}/bin:${PATH}" - - secure: Tbet2rxD8QgjthAo+bxt41qbF2wUPTx0difGK5p4yQISK/njTuT5cqcxnOa4GIbyKtNtx0EgGnyVcQJiQkmZiF6Sabf0mtqU/CQ4PmVV76e9bHwA/CrTtudibMn16ozxuuxvhNxFOMQEhwcQOkW93M/Q9FZUEw9/CGpRGFfSzuA= - -cache: - - "${HOME}/protoc" - -go: - - 1.12.x - - master - -install: - - if [ ! -d "${PROTOC_TARGET}" ]; then curl -fsSL "$PROTOC_RELEASE" > "${PROTOC_TARGET}.zip"; fi - - if [ -f "${PROTOC_TARGET}.zip" ]; then unzip "${PROTOC_TARGET}.zip" -d "${PROTOC_TARGET}"; fi - - go get github.com/golang/protobuf/{proto,protoc-gen-go} github.com/haya14busa/goverage - -script: - - goverage -race -coverprofile=coverage.txt -covermode=atomic - - make bench - - make lint - -after_success: - - bash <(curl -s https://codecov.io/bash) - -deploy: - provider: script - script: script/push_to_docker.sh - skip_cleanup: true - on: - tags: true - all_branches: true - -notifications: - email: false diff --git a/revive.toml b/revive.toml index 8d5bea18..dff685d1 100644 --- a/revive.toml +++ b/revive.toml @@ -3,6 +3,9 @@ severity = "warning" confidence = 0.8 errorCode = 1 warningCode = 1 +exclude = [ + "./tmp/..." +] [rule.blank-imports] [rule.context-as-argument]