testing.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. name: Build
  2. # This workflow is triggered on pushes to the repository.
  3. on:
  4. push:
  5. paths-ignore:
  6. - "doc/**"
  7. - "README.md"
  8. - ".gitignore"
  9. branches-ignore:
  10. - "master"
  11. pull_request:
  12. jobs:
  13. build:
  14. name: Lint and test yay
  15. runs-on: ubuntu-latest
  16. container:
  17. image: jguer/yay-builder:latest
  18. steps:
  19. - name: Checkout
  20. uses: actions/checkout@v2
  21. - uses: actions/cache@v1
  22. with:
  23. path: ~/go/pkg/mod
  24. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  25. restore-keys: |
  26. ${{ runner.os }}-go-
  27. - name: Lint
  28. run: /app/bin/golangci-lint run ./...
  29. - name: Run Build and Tests
  30. run: make test
  31. - name: checkout pacman-git
  32. run: |
  33. pacman -Sy --noconfirm sudo base-devel
  34. git clone https://aur.archlinux.org/pacman-git
  35. useradd github
  36. chmod -R 777 pacman-git
  37. echo 'github ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
  38. su github -c 'cd pacman-git; yes | makepkg -si --nocheck'
  39. - name: Run Build and Tests with pacman-git
  40. run: make test