gmessages/.github/workflows/go.yml

35 lines
709 B
YAML
Raw Normal View History

2023-06-30 09:51:54 +00:00
name: Go
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ["1.20", "1.21"]
2023-06-30 09:51:54 +00:00
steps:
- uses: actions/checkout@v4
2023-06-30 09:51:54 +00:00
- name: Set up Go
uses: actions/setup-go@v5
2023-06-30 09:51:54 +00:00
with:
go-version: ${{ matrix.go-version }}
cache: true
2023-06-30 09:51:54 +00:00
- name: Install libolm
run: sudo apt-get install libolm-dev libolm3
- name: Install goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
export PATH="$HOME/go/bin:$PATH"
- name: Install pre-commit
run: pip install pre-commit
- name: Lint
run: pre-commit run -a