66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
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
|
|
|
|
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
|
|
name: install dependencies and build bin files
|
|
|