run-tests.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: Tests
  2. on:
  3. push:
  4. paths-ignore:
  5. - "*.md"
  6. branches-ignore:
  7. - master
  8. workflow_call:
  9. jobs:
  10. test:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. with:
  15. fetch-depth: 0
  16. - name: Cache nimble
  17. id: cache-nimble
  18. uses: actions/cache@v3
  19. with:
  20. path: ~/.nimble
  21. key: nimble-${{ hashFiles('*.nimble') }}
  22. restore-keys: "nimble-"
  23. - uses: actions/setup-python@v4
  24. with:
  25. python-version: "3.10"
  26. cache: "pip"
  27. - uses: jiro4989/setup-nim-action@v1
  28. with:
  29. nim-version: "1.x"
  30. - run: nimble build -d:release -Y
  31. - run: pip install seleniumbase
  32. - run: seleniumbase install chromedriver
  33. - uses: supercharge/redis-github-action@1.5.0
  34. - name: Prepare Nitter
  35. run: |
  36. sudo apt install libsass-dev -y
  37. cp nitter.example.conf nitter.conf
  38. nimble md
  39. nimble scss
  40. - name: Run tests
  41. run: |
  42. ./nitter &
  43. pytest -n4 tests