unitTest.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: PR - Docker unit test
  2. on:
  3. pull_request:
  4. branches:
  5. - master
  6. types: [opened, reopened, synchronize, edited]
  7. # Please, always create a pull request instead of push to master.
  8. permissions:
  9. contents: read
  10. pull-requests: write
  11. concurrency:
  12. group: docker-test-${{ github.ref_name }}
  13. cancel-in-progress: true
  14. jobs:
  15. test:
  16. name: Docker tests
  17. runs-on: ubuntu-latest
  18. container:
  19. image: golang
  20. env:
  21. REPOSITORY: ${{ github.repository }}
  22. TRIGGERING_ACTOR: ${{ github.triggering_actor }}
  23. SOURCE_BRANCH: ${{ github.ref_name }}
  24. COMMIT: ${{ github.workflow_sha }}
  25. EVENT: ${{ github.event_name}}
  26. steps:
  27. - name: Checkout
  28. uses: actions/checkout@v4
  29. - name: Pull Request Labeler
  30. if: ${{ failure() }}
  31. uses: actions-cool/issues-helper@v3
  32. with:
  33. actions: 'add-labels'
  34. token: ${{ secrets.GITHUB_TOKEN }}
  35. issue-number: ${{ github.event.pull_request.number }}
  36. labels: 'Auto: Test Failed'
  37. - name: Setup Node.js environment
  38. run: apt update && apt install -y nodejs npm
  39. - name: Install Dependencies
  40. run: npm install --global yarn
  41. - name: FE build
  42. run: make build_fe
  43. - name: Run Test
  44. run: make test