mirror of
https://github.com/TomWright/dasel.git
synced 2022-05-22 02:32:45 +03:00
30 lines
939 B
YAML
30 lines
939 B
YAML
on: [push, pull_request]
|
|
name: Test
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.15.x]
|
|
platform: [ubuntu-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Checkout code
|
|
uses: actions/checkout@v1
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
- name: Test
|
|
run: go test -coverprofile=coverage.txt -covermode=atomic -race ./...
|
|
- uses: codecov/codecov-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|
|
file: ./coverage.txt # optional
|
|
flags: unittests # optional
|
|
fail_ci_if_error: false # optional (default = false) |