2020-01-12 16:16:04 +01:00
|
|
|
name: Build
|
2019-09-26 12:45:48 +02:00
|
|
|
# This workflow is triggered on pushes to the repository.
|
2019-10-16 04:04:01 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
2020-05-02 10:27:28 +02:00
|
|
|
- "doc/**"
|
|
|
|
- "README.md"
|
|
|
|
- ".gitignore"
|
2020-06-13 23:20:22 +02:00
|
|
|
branches-ignore:
|
|
|
|
- "master"
|
2019-10-16 04:04:01 +02:00
|
|
|
pull_request:
|
2019-09-26 12:45:48 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-02-28 00:08:35 +01:00
|
|
|
name: Lint and test yay
|
2019-09-26 12:45:48 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-02 16:17:20 +02:00
|
|
|
container:
|
|
|
|
image: samip537/archlinux:devel
|
2019-09-26 12:45:48 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2020-05-02 10:27:28 +02:00
|
|
|
uses: actions/checkout@v2
|
2020-05-02 16:17:20 +02:00
|
|
|
- uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
2019-09-26 12:45:48 +02:00
|
|
|
- name: Run Build and tests
|
2020-05-02 10:27:28 +02:00
|
|
|
run: |
|
2020-02-28 00:08:35 +01:00
|
|
|
pacman -Sy --noconfirm go
|
2020-06-13 23:20:22 +02:00
|
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.27.0
|
2020-02-28 00:08:35 +01:00
|
|
|
./bin/golangci-lint run ./...
|
|
|
|
make test
|