From a0bc02025ec138302c8572c21dc9ab7a67fcbebb Mon Sep 17 00:00:00 2001 From: auyer Date: Wed, 28 Jul 2021 17:01:48 -0300 Subject: [PATCH] Migrate to github actions --- .circleci/config.yml | 37 ------------------------------- .github/workflows/test.yaml | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 37 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d45900a..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,37 +0,0 @@ -# Golang CircleCI 2.1 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2.1 -orbs: - codecov: codecov/codecov@1.0.5 -jobs: - build: - docker: - - image: circleci/golang:latest - working_directory: /go/src/github.com/auyer/steganography - steps: - - checkout - - run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic - - codecov/upload: - file: coverage.txt - test110: - docker: - - image: circleci/golang:1.10 - working_directory: /go/src/github.com/auyer/steganography - steps: - - checkout - - run: go test -v ./... - test19: - docker: - - image: circleci/golang:1.9 - working_directory: /go/src/github.com/auyer/steganography - steps: - - checkout - - run: go test -v ./... -workflows: - version: 2 - build_and_test: - jobs: - - build - - test110 - - test19 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..e68b6d6 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,44 @@ +name: Unit + +on: + workflow_dispatch: + push: + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + go: [ '^1.16', '~1.12' ] + name: Go ${{ matrix.go }} sample + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + + - name: Run Race tests + run: | + go test --race + coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: "^1.16" + + - name: Run tests with Coverage report + run: | + go test -coverprofile=coverage.txt -covermode=atomic + + - name: Upload coverage report + uses: codecov/codecov-action@v2 + with: + file: ./coverage.txt \ No newline at end of file