mirror of
https://github.com/tuna/tunasync.git
synced 2025-06-14 13:32:43 +00:00
add test steps
This commit is contained in:
parent
80ad3247a0
commit
f603aebec9
38
.github/workflows/tunasync.yml
vendored
38
.github/workflows/tunasync.yml
vendored
@ -27,3 +27,41 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
make tunasync
|
make tunasync
|
||||||
make tunasynctl
|
make tunasynctl
|
||||||
|
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Setup test dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get install cgroup-bin docker.io
|
||||||
|
lssubsys -am
|
||||||
|
sudo cgcreate -a $USER -t $USER -g cpu:tunasync
|
||||||
|
sudo cgcreate -a $USER -t $USER -g memory:tunasync
|
||||||
|
sudo docker pull alpine
|
||||||
|
|
||||||
|
- name: Set up Go 1.13
|
||||||
|
uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: 1.13
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code into the Go module directory
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Run Unit tests.
|
||||||
|
run: make test
|
||||||
|
|
||||||
|
- name: Convert coverage to lcov
|
||||||
|
uses: jandelgado/gcov2lcov-action@v1.0.0
|
||||||
|
with:
|
||||||
|
infile: profile.cov
|
||||||
|
outfile: coverage.lcov
|
||||||
|
|
||||||
|
- name: Coveralls
|
||||||
|
uses: coverallsapp/github-action@v1.0.1
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.github_token }}
|
||||||
|
path-to-lcov: coverage.lcov
|
3
Makefile
3
Makefile
@ -19,3 +19,6 @@ tunasynctl: build
|
|||||||
|
|
||||||
travis-package: tunasync tunasynctl
|
travis-package: tunasync tunasynctl
|
||||||
tar zcf build/tunasync-linux-bin.tar.gz -C build tunasync tunasynctl
|
tar zcf build/tunasync-linux-bin.tar.gz -C build tunasync tunasynctl
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test -v -covermode=count -coverprofile=profile.cov ./...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user