Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Felixoid committed Jul 29, 2021
1 parent e7dca22 commit 31bc1ac
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

tests:
name: Test code
runs-on: ${{ matrix.os }}
strategy:
matrix:
go:
- ^1.14
- ^1.15
- ^1.16
- ^1
os:
- ubuntu-latest
- macos-latest
steps:

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}

- name: Check out code
uses: actions/checkout@v2

- name: Checkout to the latest tag
run: |
# Fetch all tags
git fetch --depth=1 --tags
# Get the latest tag
VERS=$(git tag -l | sort -Vr | head -n1)
# Fetch everything to the latest tag
git fetch --shallow-since=$(git log $VERS -1 --format=%at)
if: ${{ github.event_name == 'push' }} # only when built from master

- name: Install dependencies
run: |
make install-dependencies
make install-tools
make install
- name: Linting
run: make lint

- name: Testing
run: |
make test-verbose-with-coverage
gover
- name: Coverage
run: goveralls -coverprofile=gover.coverprofile -service=github
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 31bc1ac

Please sign in to comment.