From c0f8ce4c9c21e462f362bb4ca4436a8dcd161d61 Mon Sep 17 00:00:00 2001 From: Mat Byczkowski Date: Mon, 11 Oct 2021 14:04:55 -0700 Subject: [PATCH 1/2] Remove Travis CI --- .travis.yml | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6388e8f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- - -language: go - -go: - - '1.16.x' - -install: - - pip install cram --user - -before_script: - - go vet -v ./... - -script: - - GOOS=linux GOARCH=amd64 go build -o certigo-linux-amd64 - - GOOS=darwin GOARCH=amd64 go build -o certigo-darwin-amd64 - - GOOS=windows GOARCH=amd64 go build -o certigo-windows-amd64.exe - - go test -v ./... - - ln -s certigo-linux-amd64 certigo - - PATH=$PWD:$PATH cram -v tests/*.t - -deploy: - provider: releases - api_key: - # mbyczkowski's OAuth token - secure: SJqQjZ+4TT/CqAPy/7Z/Y1kIoYQt1GMw/kVkh6QpYqTaknqnWmNlwn/GdMATdiFo5X4GsPoE9euc+z5E9FeVgOlxypOzf/H0K2eV5YRitjQYrtzjVCkCnWt6AIOBRHWF31+mtkk2kbG7k0N/cj6GOpj93sX2Bh8+zM3O86SEgC2bipGTuNkR+PJh09Euthe1C/zlELyyo1Hg/rfnD8mRmPK7hSRj0FTlJLCkxHC7ou9r6FMyxC25uRKg7r3bocOOYUyDstZRid5HnKbxhfPhCAE+xHdLuH3+iQdAS0g0TYIfajGEm4nrgCWlMB7hqKcP5Ob3YFNdlmAp/61y2tBRZlk5S3bjU4XnEfjxN7wmAs0Em+SAH9R2U1hl4fDOwxXoBxDuKpu1FH598Q4xA2bfZrnzNnzVXvRTjSAb4a0CzwU8wRuftqCeGWrylaDPRSVVAtTUyukEoV/3KBfZaSCE5xXI7uu2IsqG4SLmxod1X/EdamM16ZkUzrsgtCJGUIjNcOQw1lro9PV1A5oac02hkEwW87N5OY36abTlKhkbpGZJvkN21UF4HUJM/W1UCUMYNZ7hOwU3H2kWZrmWHSXfRvjwJxwqXYVEX4MTULccV8JcPq4fRywV+uCkT/aGEzNXLv++9r7Ut9aqGuQi6Aee2SjtjRBVXeWKpCJMUNB8fow= - file: - - certigo-linux-amd64 - - certigo-darwin-amd64 - - certigo-windows-amd64.exe - skip_cleanup: true - draft: true - on: - repo: square/certigo - tags: true From dd20d54fbba7baf566a49ee626e3f507676be283 Mon Sep 17 00:00:00 2001 From: Mat Byczkowski Date: Mon, 11 Oct 2021 14:09:52 -0700 Subject: [PATCH 2/2] Set-up GH Actions for CI --- .github/workflows/lint.yaml | 18 +++++++++++++++ .github/workflows/test.yaml | 44 +++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 .github/workflows/lint.yaml create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..552ac8d --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,18 @@ +--- +name: Lint + +on: + pull_request: + branches: [ master ] + +jobs: + golangci: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.39 + only-new-issues: true \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..191353e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,44 @@ +--- +name: Test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: Unit tests + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.17.x' + - name: Build binary + run: go build + - name: Run tests + run: go test -v ./... + integration: + name: Integration tests + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.17.x' + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install cram + run: pip install cram --user + - name: Check out code + uses: actions/checkout@v2 + - name: Build binary + run: go build + - name: Run tests + run: PATH=$PWD:$PATH cram -v tests/*.t \ No newline at end of file