testing.yml 853 B

1234567891011121314151617181920212223242526272829303132
  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. env:
  20. GOFLAGS: -buildvcs=false
  21. run: /app/bin/golangci-lint run ./...
  22. - name: Run Build and Tests
  23. run: make test
  24. - name: Run Integration Tests
  25. continue-on-error: true
  26. run: |
  27. useradd -m yay &&
  28. chown -R yay:yay . &&
  29. cp -r ~/go/ /home/yay/go/ &&
  30. chown -R yay:yay /home/yay/go/ &&
  31. su yay -c "make test-integration"