2024-12-18 15:29:16 +00:00
|
|
|
name: ci
|
2024-12-15 09:22:46 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
2024-12-18 15:29:16 +00:00
|
|
|
codespell:
|
|
|
|
name: check for spelling errors
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Annotate locations with typos
|
|
|
|
uses: "https://github.com/codespell-project/codespell-problem-matcher@v1"
|
|
|
|
- name: Codespell
|
|
|
|
uses: "https://github.com/codespell-project/actions-codespell@v2"
|
|
|
|
with:
|
|
|
|
check_filenames: true
|
|
|
|
check_hidden: true
|
|
|
|
skip: ./.git
|
|
|
|
|
|
|
|
codequality:
|
|
|
|
name: code quality (lint/tests)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
|
|
- codespell
|
|
|
|
if: ${{ success() }}
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- uses: https://code.forgejo.org/actions/setup-go@v5
|
|
|
|
name: install go
|
|
|
|
with:
|
|
|
|
go-version-file: './go.mod'
|
|
|
|
- name: install dependencies
|
|
|
|
run: make dep
|
|
|
|
- name: download golangci-lint
|
|
|
|
run: wget https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh
|
|
|
|
- name: install golangci-lint
|
|
|
|
run: sh ./install.sh v1.62.2
|
|
|
|
- name: lint
|
|
|
|
run: ./bin/golangci-lint run
|
|
|
|
|
2024-12-15 09:22:46 +00:00
|
|
|
build:
|
|
|
|
name: Make sure build does not fail
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
name: checkout
|
|
|
|
- name: install alsa devel
|
|
|
|
run: apt update && apt install libasound2-dev -y
|
|
|
|
- uses: https://code.forgejo.org/actions/setup-go@v5
|
|
|
|
name: install go
|
|
|
|
with:
|
|
|
|
go-version-file: './go.mod'
|
|
|
|
- run: go version
|
|
|
|
name: Go version
|
|
|
|
- run: make build
|
2024-12-15 17:24:10 +00:00
|
|
|
name: install dependencies and build bin files
|
2024-12-15 09:22:46 +00:00
|
|
|
|