go.yml 701 B

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