From 4e0ce6e824a74913c9f16dc2367ff27dcb89065c Mon Sep 17 00:00:00 2001 From: Simon Aronsson Date: Sun, 10 Jan 2021 12:24:13 +0100 Subject: [PATCH] chore(ci): move to github actions --- .github/workflows/pull-request.yml | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..cb516ba --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,61 @@ +name: Main Workflow + +on: + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15.x + - name: Lint + run: | + go get -u golang.org/lint/golint + golint -set_exit_status ./... + test: + strategy: + matrix: + go-version: + - 1.15.x + platform: + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.platform }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15.x + - name: Run tests + run: | + go test ./... -coverprofile coverage.out + + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.15.x + - name: Build + uses: goreleaser/goreleaser-action@v2 + with: + version: v0.104.1 + args: --snapshot --skip-publish --debug \ No newline at end of file