testing-git.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Test against pacman-git
  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: checkout pacman-git
  28. run: |
  29. pacman -Syu --overwrite=* --noconfirm sudo base-devel
  30. git clone https://aur.archlinux.org/pacman-git
  31. useradd github
  32. chmod -R 777 pacman-git
  33. echo 'github ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
  34. su github -c 'cd pacman-git; yes | makepkg -si --nocheck'
  35. - name: Run Build and Tests with pacman-git
  36. run: make test