Skip to content

Merge pull request #31 from slashformotion/cleanup #58

Merge pull request #31 from slashformotion/cleanup

Merge pull request #31 from slashformotion/cleanup #58

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
branches: [ '**' ]
jobs:
check-style:
name: Code style
runs-on: ubuntu-latest
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libmpv-dev
version: 1.0
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.19'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libmpv-dev
version: 1.0
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: '^1.19'
- name: Run units tests
run: go test -json ./... > test.json
- name: Annotate tests
if: always()
uses: guyarb/golang-test-annotations@v0.5.1
with:
test-results: test.json
build:
name: Build Radioboat
runs-on: ubuntu-latest
needs: [unit-tests]
strategy:
matrix:
go_version: ['1.20.x', '1.21.x', '1.22.x']
steps:
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libmpv-dev
version: 1.0
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
- name: Build
run: go build -v .
- name: Upload binary
uses: actions/upload-artifact@v1
with:
name: binary_${{ matrix.go_version }}
path: ./radioboat