You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.1 KiB

  1. name: tests
  2. on:
  3. pull_request:
  4. branches:
  5. - "12.0*"
  6. push:
  7. branches:
  8. - "12.0"
  9. - "12.0-ocabot-*"
  10. jobs:
  11. unreleased-deps:
  12. runs-on: ubuntu-latest
  13. name: Detect unreleased dependencies
  14. steps:
  15. - uses: actions/checkout@v2
  16. - run: |
  17. for reqfile in requirements.txt test-requirements.txt ; do
  18. if [ -f ${reqfile} ] ; then
  19. result=0
  20. # reject non-comment lines that contain a / (i.e. URLs, relative paths)
  21. grep "^[^#].*/" ${reqfile} || result=$?
  22. if [ $result -eq 0 ] ; then
  23. echo "Unreleased dependencies found in ${reqfile}."
  24. exit 1
  25. fi
  26. fi
  27. done
  28. test:
  29. runs-on: ubuntu-latest
  30. container: ${{ matrix.container }}
  31. name: ${{ matrix.name }}
  32. strategy:
  33. fail-fast: false
  34. matrix:
  35. include:
  36. - container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest
  37. makepot: "true"
  38. name: test with Odoo
  39. - container: ghcr.io/oca/oca-ci/py3.6-ocb12.0:latest
  40. name: test with OCB
  41. services:
  42. postgres:
  43. image: postgres:9.6
  44. env:
  45. POSTGRES_USER: odoo
  46. POSTGRES_PASSWORD: odoo
  47. POSTGRES_DB: odoo
  48. ports:
  49. - 5432:5432
  50. steps:
  51. - uses: actions/checkout@v2
  52. with:
  53. persist-credentials: false
  54. - name: Install addons and dependencies
  55. run: oca_install_addons
  56. - name: Check licenses
  57. run: manifestoo -d . check-licenses
  58. - name: Check development status
  59. run: manifestoo -d . check-dev-status --default-dev-status=Beta
  60. - name: Initialize test db
  61. run: oca_init_test_database
  62. - name: Run tests
  63. run: oca_run_tests
  64. - uses: codecov/codecov-action@v1
  65. - name: Update .pot files
  66. run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
  67. if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}