ci_e2e.yml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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: ["push", "pull_request"]
  18. env:
  19. DOCKER_DIR: ./docker
  20. LOG_DIR: /tmp/dolphinscheduler
  21. name: e2e Test
  22. jobs:
  23. build:
  24. name: Test
  25. runs-on: ubuntu-latest
  26. steps:
  27. - uses: actions/checkout@v1
  28. with:
  29. submodules: true
  30. - uses: actions/cache@v1
  31. with:
  32. path: ~/.m2/repository
  33. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  34. restore-keys: |
  35. ${{ runner.os }}-maven-
  36. - name: Build Image
  37. run: |
  38. export VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT</version>" | awk -F "-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'`
  39. sh ./dockerfile/hooks/build
  40. - name: Docker Run
  41. run: |
  42. VERSION=`cat $(pwd)/pom.xml| grep "SNAPSHOT</version>" | awk -F "-SNAPSHOT" '{print $1}' | awk -F ">" '{print $2}'`
  43. docker run -dit -e POSTGRESQL_USERNAME=test -e POSTGRESQL_PASSWORD=test -p 8888:8888 dolphinscheduler:$VERSION all
  44. - name: Check Server Status
  45. run: sh ./dockerfile/hooks/check
  46. - name: Prepare e2e env
  47. run: |
  48. sudo apt-get install -y libxss1 libappindicator1 libindicator7 xvfb unzip
  49. wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  50. sudo dpkg -i google-chrome*.deb
  51. sudo apt-get install -f -y
  52. wget -N https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_linux64.zip
  53. unzip chromedriver_linux64.zip
  54. sudo mv -f chromedriver /usr/local/share/chromedriver
  55. sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
  56. - name: Run e2e Test
  57. run: cd ./e2e && mvn -B clean test
  58. - name: Collect logs
  59. run: |
  60. mkdir -p ${LOG_DIR}
  61. docker logs dolphinscheduler > ${LOG_DIR}/dolphinscheduler.txt
  62. continue-on-error: true