Skip to content

Commit

Permalink
Rework CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
gavv committed Nov 14, 2022
1 parent 18182d4 commit 1b24081
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 14 deletions.
49 changes: 36 additions & 13 deletions .github/workflows/build.yaml
Expand Up @@ -19,16 +19,12 @@ jobs:

strategy:
matrix:
include:
- go: 1.17
coverage: no
- go: 1.x
coverage: yes
go: [1.17, 1.x]

name: Go ${{ matrix.go }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
Expand All @@ -39,25 +35,52 @@ jobs:
run: go get -v .

- name: Run tests
run: go test -covermode=count -coverprofile=coverage.out
run: go test

- name: Build examples
run: cd _examples && go get -v .

- name: Run examples tests
run: cd _examples && go test

linters:
runs-on: ubuntu-latest

name: Linters
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.x

- name: Run linters
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.1

- name: Build examples
run: cd _examples && go get -v .
coverage:
runs-on: ubuntu-latest

- name: Run examples tests
run: cd _examples && go test
name: Coverage
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.x

- name: Run tests
run: go test -covermode=count -coverprofile=coverage.out

- name: Prepare coverage report
if: ${{ matrix.coverage == 'yes' }}
uses: jandelgado/gcov2lcov-action@v1.0.5

- name: Send coverage report
if: ${{ matrix.coverage == 'yes' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# httpexpect [![GoDev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/gavv/httpexpect/v2) [![Build](https://github.com/gavv/httpexpect/workflows/build/badge.svg)](https://github.com/gavv/httpexpect/actions) [![Coveralls](https://coveralls.io/repos/github/gavv/httpexpect/badge.svg?branch=master)](https://coveralls.io/github/gavv/httpexpect?branch=master) [![GitHub release](https://img.shields.io/github/tag/gavv/httpexpect.svg)](https://github.com/gavv/httpexpect/releases)
# httpexpect [![GoDev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/gavv/httpexpect/v2) [![Build](https://github.com/gavv/httpexpect/workflows/build/badge.svg)](https://github.com/gavv/httpexpect/actions) [![Coveralls](https://coveralls.io/repos/github/gavv/httpexpect/badge.svg?branch=master)](https://coveralls.io/github/gavv/httpexpect?branch=master) [![GitHub release](https://img.shields.io/github/tag/gavv/httpexpect.svg)](https://github.com/gavv/httpexpect/tags)

Concise, declarative, and easy to use end-to-end HTTP and REST API testing for Go (golang).

Expand Down

0 comments on commit 1b24081

Please sign in to comment.