testing-git.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Test against pacman-git
  2. on:
  3. pull_request:
  4. paths-ignore:
  5. - "doc/**"
  6. - "**/*.po"
  7. - "README.md"
  8. - ".gitignore"
  9. jobs:
  10. build:
  11. name: Lint and test yay (-git)
  12. runs-on: ubuntu-latest
  13. container:
  14. image: jguer/yay-builder:latest
  15. steps:
  16. - uses: actions/checkout@v3
  17. - uses: actions/cache@v3
  18. with:
  19. path: ~/go/pkg/mod
  20. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  21. restore-keys: |
  22. ${{ runner.os }}-go-
  23. - uses: actions/cache@v3
  24. with:
  25. path: /home/runner/work/yay/yay/pacman-git
  26. key: ${{ runner.os }}-pacman-${{ hashFiles('/home/runner/work/yay/yay/pacman-git/PKGBUILD') }}
  27. restore-keys: |
  28. ${{ runner.os }}-pacman-
  29. - name: checkout pacman-git
  30. run: |
  31. git -C ./pacman-git pull || git clone https://aur.archlinux.org/pacman-git
  32. useradd github
  33. echo 'github ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
  34. chmod -R 777 pacman-git
  35. su github -c 'cd pacman-git; yes | makepkg -i --nocheck'
  36. - name: Run Build and Tests with pacman-git
  37. run: make test