underscore/.github/workflows/unit-test.yml
Ruidy 2d05b6c518
add unit test pipeline (#8)
* add unit test pipeline

* edit triggers

* change version

* change version

* other try

* other try

* fix: redeclared function name

Co-authored-by: Ruidy <rnemausat@newstore.com>
2022-01-02 03:28:12 +01:00

26 lines
No EOL
767 B
YAML

name: Unit Tests
on: [ push, pull_request ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install gotip
run: |
git clone --depth=1 https://go.googlesource.com/go $HOME/gotip
cd $HOME/gotip/src
./make.bash
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV
echo "$HOME/gotip/bin:$PATH" >> $GITHUB_PATH
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Test
run: go test -v ./...