Skip to content

Add GitHub Actions Workflow #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Go
on: [push]
jobs:
build:
name: Build by go ${{ matrix.go }}
runs-on: ubuntu-18.04
strategy:
matrix:
go: ["1.12", "1.13"]
steps:
- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
id: go

- name: Install lirc
run: |
sudo apt -qq update && sudo apt -qq install \
autoconf libtool libxml2-dev xsltproc python3-dev python3-setuptools
cd /tmp
git clone git://git.code.sf.net/p/lirc/git -b lirc-0.10.1 --depth 1 lirc
cd lirc
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
sudo mkdir -p /var/run/lirc
lircd -v

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Launch lircd
run: |
export LIRC_RUN_PATH=/home/runner/work/lirc-web-api/lirc-web-api/lirc/test
sudo cp $LIRC_RUN_PATH/lircd.conf \
/usr/local/etc/lirc/lircd.conf.d/lighting.conf
sudo lircd --logfile=$LIRC_RUN_PATH/lirc.log \
--allow-simulate \
--driver simsend

- name: Get dependencies
run: |
go get -v -t -d ./...

- name: Build
run: |
go build -v .

- name: Test
run: |
go test ./...
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.*
!.gitignore
!.github

# golang
vendor
Expand Down
45 changes: 0 additions & 45 deletions glide.lock

This file was deleted.

8 changes: 0 additions & 8 deletions glide.yaml

This file was deleted.

18 changes: 18 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module github.com/ww24/lirc-web-api

go 1.13

require (
github.com/dgrijalva/jwt-go v3.0.1-0.20161101193935-9ed569b5d1ac+incompatible // indirect
github.com/golang/mock v0.0.0-20160127222235-bd3c8e81be01
github.com/labstack/echo v3.0.3+incompatible
github.com/labstack/gommon v0.1.1-0.20161202074203-447fe7433567
github.com/mattn/go-colorable v0.0.7 // indirect
github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c // indirect
github.com/stretchr/testify v1.4.0 // indirect
github.com/tylerb/graceful v1.2.14-0.20161117165325-4df119083532 // indirect
github.com/valyala/fasttemplate v0.0.0-20160315193134-3b874956e03f // indirect
golang.org/x/crypto v0.0.0-20161216171927-9b1a210a06ea // indirect
golang.org/x/net v0.0.0-20161215194249-45e771701b81 // indirect
golang.org/x/sys v0.0.0-20161214190518-d75a52659825 // indirect
)
33 changes: 33 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.0.1-0.20161101193935-9ed569b5d1ac+incompatible h1:nBDeei+Kh2/zeFbpeGxwTTw/3cpazdo4cyURcV8PXs8=
github.com/dgrijalva/jwt-go v3.0.1-0.20161101193935-9ed569b5d1ac+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/golang/mock v0.0.0-20160127222235-bd3c8e81be01 h1:rtnkE5nwSSDcZrbt4gcVsFPeSXXe7Nq2vCn9DBb0Y8I=
github.com/golang/mock v0.0.0-20160127222235-bd3c8e81be01/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/labstack/echo v3.0.3+incompatible h1:L5+M/D4EeWi1QVqnJYu8UTHCyNdPR4WcNPcYzr1r3tM=
github.com/labstack/echo v3.0.3+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s=
github.com/labstack/gommon v0.1.1-0.20161202074203-447fe7433567 h1:NprNtaZLLOhcYDjnouE33GSqvHHiOsrbJ7m/6DAfryc=
github.com/labstack/gommon v0.1.1-0.20161202074203-447fe7433567/go.mod h1:/tj9csK2iPSBvn+3NLM9e52usepMtrd5ilFYA+wQNJ4=
github.com/mattn/go-colorable v0.0.7 h1:zh4kz16dcPG+l666m12h0+dO2HGnQ1ngy7crMErE2UU=
github.com/mattn/go-colorable v0.0.7/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c h1:YHHK/dEmr2Jo1cWD1VMB2waEeHJhHFp3CEylwWy/VcY=
github.com/mattn/go-isatty v0.0.0-20161123143637-30a891c33c7c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/tylerb/graceful v1.2.14-0.20161117165325-4df119083532 h1:jEsmCC6/AZjDfYV3hC/iK3X9FaOS2ZK0kr6OYtosyEg=
github.com/tylerb/graceful v1.2.14-0.20161117165325-4df119083532/go.mod h1:LPYTbOYmUTdabwRt0TGhLllQ0MUNbs0Y5q1WXJOI9II=
github.com/valyala/fasttemplate v0.0.0-20160315193134-3b874956e03f h1:qL0GulPcltegqmwdnhakM62NW+QeDQ+p1OpfnG8ExQ8=
github.com/valyala/fasttemplate v0.0.0-20160315193134-3b874956e03f/go.mod h1:50wTf68f99/Zt14pr046Tgt3Lp2vLyFZKzbFXTOabXw=
golang.org/x/crypto v0.0.0-20161216171927-9b1a210a06ea h1:gJbDpr1hNdfHVz3vkc+HJ978KPoVcx7cjffd1ll2TqU=
golang.org/x/crypto v0.0.0-20161216171927-9b1a210a06ea/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/net v0.0.0-20161215194249-45e771701b81 h1:fw6vKYqWlQqaVrIv7KcFK8YHLSj7xKY86A9h28yw1ws=
golang.org/x/net v0.0.0-20161215194249-45e771701b81/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sys v0.0.0-20161214190518-d75a52659825 h1:4d9VvrP9mESHxCpAwE1G5e1D8Ybj9v7pX19HkGQV0lk=
golang.org/x/sys v0.0.0-20161214190518-d75a52659825/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
125 changes: 0 additions & 125 deletions wercker.yml

This file was deleted.