Skip to content

Commit

Permalink
👷 Add GitHub Actions based CI
Browse files Browse the repository at this point in the history
  • Loading branch information
daenney committed Apr 13, 2020
1 parent f1d7603 commit c61609a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI
on:
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
branches:
- master
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
branches:
- master

jobs:
build_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: '1.14'
- name: Build
run: |
go build lib.hemtjan.st/...
- name: Get an MQTT broker
env:
MOSQUITTO_VERSION: 1.6.9
run: |
docker pull eclipse-mosquitto:${MOSQUITTO_VERSION}
docker run -d --name broker -p 127.0.0.1:1883:1883 eclipse-mosquitto:${MOSQUITTO_VERSION} -- mosquitto -v
docker ps
- name: Unit and integration tests
env:
BIBLIOTEK_TEST_INTEGRATION: 1
run: |
go test -v -race -coverprofile=coverage.txt -covermode=atomic lib.hemtjan.st/...
- name: Get broker logs on failure
if: failure()
run:
docker logs broker
- name: Upload code coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 🏛️ Bibliotek 📚 [![Build Status](https://travis-ci.org/hemtjanst/bibliotek.svg?branch=master)](https://travis-ci.org/hemtjanst/bibliotek) ![GitHub release](https://img.shields.io/github/release/hemtjanst/bibliotek.svg) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/lib.hemtjan.st/)
# 🏛️ Bibliotek 📚 [![CI](https://github.com/hemtjanst/bibliotek/workflows/CI/badge.svg?branch=master)](https://github.com/hemtjanst/bibliotek/actions?query=workflow%3ACI) ![GitHub release](https://img.shields.io/github/release/hemtjanst/bibliotek.svg) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/lib.hemtjan.st/)

Bibliotek ('library' in Swedish) provides common primitives and utilities for
integrating with and extending the Hemtjänst platform.
Expand Down

0 comments on commit c61609a

Please sign in to comment.