testing.yml 805 B

123456789101112131415161718192021222324252627282930
  1. name: Test against pacman
  2. on:
  3. pull_request:
  4. jobs:
  5. build:
  6. name: Lint and test yay
  7. runs-on: ubuntu-latest
  8. container:
  9. image: jguer/yay-builder:latest
  10. steps:
  11. - uses: actions/checkout@v3
  12. - uses: actions/cache@v3
  13. with:
  14. path: ~/go/pkg/mod
  15. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  16. restore-keys: |
  17. ${{ runner.os }}-go-
  18. - name: Lint
  19. run: /app/bin/golangci-lint run ./...
  20. - name: Run Build and Tests
  21. run: make test
  22. - name: Run Integration Tests
  23. continue-on-error: true
  24. run: |
  25. useradd -m yay &&
  26. chown -R yay:yay . &&
  27. cp -r ~/go/ /home/yay/go/ &&
  28. chown -R yay:yay /home/yay/go/ &&
  29. su yay -c "make test-integration"