58 lines
1.1 KiB
YAML
58 lines
1.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- actions
|
|
pull_request:
|
|
branches:
|
|
- actions
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ^1.14
|
|
id: go
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# https://github.com/streamlink/streamlink/pull/2932
|
|
# https://github.com/actions/checkout/issues/217#issuecomment-636481619
|
|
# - name: Fetch tags
|
|
# # run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
|
# run: git fetch
|
|
|
|
- name: Install tools
|
|
run: make install
|
|
|
|
- name: Assets & UI
|
|
run: make assets
|
|
|
|
- name: Porcelain
|
|
run: |
|
|
go mod tidy
|
|
test -z "$(git status --porcelain)" || (git status; git diff; false)
|
|
|
|
- name: Build
|
|
run: make build
|
|
|
|
- name: Test
|
|
run: make test
|