123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- name: tunasync
- on: [push]
- jobs:
- build:
- name: Build
- runs-on: ubuntu-latest
- steps:
- - 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: Get dependencies
- run: |
- go get -v -t -d ./cmd/tunasync
- go get -v -t -d ./cmd/tunasynctl
- - name: Build
- run: |
- make tunasync
- make tunasynctl
- test:
- name: Test
- runs-on: ubuntu-latest
- steps:
- - name: Setup test dependencies
- run: |
- sudo apt update
- sudo apt install -y cgroup-bin docker.io
- sudo systemctl start docker
- sudo docker pull alpine
- lssubsys -am
- sudo cgcreate -a $USER -t $USER -g cpu:tunasync
- sudo cgcreate -a $USER -t $USER -g memory:tunasync
- - 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
|