| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- name: Run test case
- on:
- push:
- tags:
- - v*
- release:
- types:
- - published
- pull_request:
- jobs:
- run_static_analysis:
- runs-on: ubuntu-20.04
- container: emqx/build-env:erl23.2.7-ubuntu20.04
- steps:
- - uses: actions/checkout@v2
- - name: set git credentials
- run: |
- if make emqx-ee --dry-run > /dev/null 2>&1; then
- echo "https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com" > $HOME/.git-credentials
- git config --global credential.helper store
- fi
- - name: xref
- run: make xref
- - name: dialyzer
- run: make dialyzer
- run_common_test:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v2
- - name: set edition
- id: set_edition
- run: |
- if make emqx-ee --dry-run > /dev/null 2>&1; then
- echo "EDITION=enterprise" >> $GITHUB_ENV
- else
- echo "EDITION=opensource" >> $GITHUB_ENV
- fi
- - name: docker compose up
- if: env.EDITION == 'opensource'
- env:
- MYSQL_TAG: 8
- REDIS_TAG: 6
- MONGO_TAG: 4
- PGSQL_TAG: 13
- LDAP_TAG: 2.4.50
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- docker-compose -f .ci/apps_tests/docker-compose.yaml build --no-cache
- docker-compose -f .ci/apps_tests/docker-compose.yaml up -d
- - name: docker compose up
- if: env.EDITION == 'enterprise'
- env:
- MYSQL_TAG: 8
- REDIS_TAG: 6
- MONGO_TAG: 4
- PGSQL_TAG: 13
- LDAP_TAG: 2.4.50
- OPENTSDB_TAG: latest
- INFLUXDB_TAG: 1.7.6
- DYNAMODB_TAG: 1.11.477
- TIMESCALE_TAG: latest-pg11
- CASSANDRA_TAG: 3.11.6
- RABBITMQ_TAG: 3.7
- KAFKA_TAG: 2.5.0
- PULSAR_TAG: 2.3.2
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- docker-compose -f .ci/apps_tests/docker-compose.yaml -f .ci/apps_tests/docker-compose.enterprise.yaml build --no-cache
- docker-compose -f .ci/apps_tests/docker-compose.yaml -f .ci/apps_tests/docker-compose.enterprise.yaml up -d
- docker exec -i erlang bash -c "echo \"https://ci%40emqx.io:${{ secrets.CI_GIT_TOKEN }}@github.com\" > /root/.git-credentials && git config --global credential.helper store"
- while [ $(docker ps -a --filter name=client --filter exited=0 | wc -l) \
- != $(docker ps -a --filter name=client | wc -l) ]; do
- sleep 5
- done
- - name: run eunit
- run: |
- docker exec -i erlang bash -c "make eunit"
- - name: run common test
- run: |
- docker exec -i erlang bash -c "make ct"
- - name: run cover
- run: |
- docker exec -i erlang bash -c "make cover"
- docker exec -i erlang bash -c "make coveralls"
- - uses: actions/upload-artifact@v1
- if: failure()
- with:
- name: logs
- path: _build/test/logs
- - uses: actions/upload-artifact@v1
- with:
- name: cover
- path: _build/test/cover
|