go.yml 580 B

12345678910111213141516171819202122232425262728
  1. name: Go
  2. on: [push, pull_request]
  3. jobs:
  4. lint:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v3
  8. - name: Set up Go
  9. uses: actions/setup-go@v3
  10. with:
  11. go-version: "1.20"
  12. - name: Install libolm
  13. run: sudo apt-get install libolm-dev libolm3
  14. - name: Install goimports
  15. run: |
  16. go install golang.org/x/tools/cmd/goimports@latest
  17. export PATH="$HOME/go/bin:$PATH"
  18. - name: Install pre-commit
  19. run: pip install pre-commit
  20. - name: Lint
  21. run: pre-commit run -a