e2e.yml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one or more
  3. # contributor license agreements. See the NOTICE file distributed with
  4. # this work for additional information regarding copyright ownership.
  5. # The ASF licenses this file to You under the Apache License, Version 2.0
  6. # (the "License"); you may not use this file except in compliance with
  7. # the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. on: ["pull_request"]
  18. env:
  19. DOCKER_DIR: ./docker
  20. LOG_DIR: /tmp/dolphinscheduler
  21. name: Test
  22. concurrency:
  23. group: e2e-${{ github.event.pull_request.number || github.ref }}
  24. cancel-in-progress: true
  25. jobs:
  26. test:
  27. name: E2E
  28. runs-on: ubuntu-latest
  29. steps:
  30. - uses: actions/checkout@v2
  31. with:
  32. submodules: true
  33. - name: Sanity Check
  34. uses: ./.github/actions/sanity-check
  35. - uses: actions/cache@v1
  36. with:
  37. path: ~/.m2/repository
  38. key: ${{ runner.os }}-maven
  39. - name: Build Image
  40. run: |
  41. sh ./docker/build/hooks/build
  42. - name: Docker Run
  43. run: |
  44. export VERSION=$(cat $(pwd)/pom.xml | grep '<revision>' -m 1 | awk '{print $1}' | sed 's/<revision>//' | sed 's/<\/revision>//')
  45. sed -i "s/apache\/dolphinscheduler:latest/apache\/dolphinscheduler:${VERSION}/g" $(pwd)/docker/docker-swarm/docker-compose.yml
  46. docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml up -d
  47. - name: Check Server Status
  48. run: sh $(pwd)/docker/docker-swarm/check
  49. - name: Prepare e2e env
  50. run: |
  51. sudo apt-get install -y libxss1 libappindicator1 libindicator7 xvfb unzip libgbm1
  52. wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  53. sudo dpkg -i google-chrome*.deb
  54. sudo apt-get install -f -y
  55. google-chrome -version
  56. googleVersion=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
  57. wget -N https://chromedriver.storage.googleapis.com/${googleVersion}/chromedriver_linux64.zip
  58. unzip chromedriver_linux64.zip
  59. sudo mv -f chromedriver /usr/local/share/chromedriver
  60. sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
  61. # - name: Run e2e Test
  62. # run: cd ./e2e && mvn -B clean test
  63. - name: Collect logs
  64. if: failure()
  65. uses: actions/upload-artifact@v2
  66. with:
  67. name: dslogs
  68. path: ${{ github.workspace }}/docker/docker-swarm/dolphinscheduler-logs