Skip to content

Commit

Permalink
chore: add coverage to CI and update/fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
smlx committed Jul 25, 2021
1 parent 7c93d28 commit 780b333
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "^1.15"
go-version: "^1.16"
- name: Install Dependencies (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get -u install libpcsclite-dev
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Coverage
on:
push:
branches:
- main

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Configure git
run: |
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up go
uses: actions/setup-go@v2
with:
go-version: "^1.16"
- name: Calculate coverage
run: go test -v -covermode=count -coverprofile=coverage.out
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.8
- name: Coveralls
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
3 changes: 1 addition & 2 deletions .github/workflows/release-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "^1.15"
go-version: "^1.16"
- name: Install Dependencies (ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get -u install libpcsclite-dev
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "^1.15"
go-version: "^1.16"
- name: Install ccv
working-directory: /
run: GO111MODULE=on go get github.com/smlx/ccv
run: >
curl -sSL https://github.com/smlx/ccv/releases/download/v0.3.2/ccv_0.3.2_linux_amd64.tar.gz
| sudo tar -xz -C /usr/local/bin ccv
- name: Bump tag if necessary
id: bump-tag
run: |
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "^1.15"
go-version: "^1.16"
- name: Install Dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get -u install libpcsclite-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: "^1.15"
go-version: "^1.16"
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get -u install libpcsclite-dev
- name: Run Tests
Expand Down

0 comments on commit 780b333

Please sign in to comment.