Skip to content

Merge pull request #64 from thalesmg/handle-sock-close #729

Merge pull request #64 from thalesmg/handle-sock-close

Merge pull request #64 from thalesmg/handle-sock-close #729

name: Run test cases
on: [push, pull_request]
jobs:
run_test_cases:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pulsar_tag:
- 2.7.0
- 2.10.0
steps:
- name: install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- uses: actions/checkout@v2.4.2
- name: run test cases
env:
PULSAR_TAG: ${{ matrix.pulsar_tag }}
run: |
docker-compose -f ./docker-compose.yml up -d
sleep 15
docker exec -i erlang sh -c "make xref"
docker exec -i erlang sh -c "make dialyzer"
docker exec -i erlang sh -c "make eunit"
docker exec -i erlang sh -c "make ct"
docker exec -i erlang sh -c "make cover"
- name: get container logs on failure
if: failure()
run: |
echo "============== pulsar-begin =============="
docker logs pulsar
echo "============== pulsar-end =============="
echo "============== pulsar-basic-auth-begin =============="
docker logs pulsar-basic-auth
echo "============== pulsar-basic-auth-end =============="
echo "============== pulsar-token-auth-begin =============="
docker logs pulsar-token-auth
echo "============== pulsar-token-auth-end =============="
- name: make coveralls
if: ${{github.event_name != 'pull_request' && matrix.pulsar_tag == '2.10.0.3'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
printenv | grep "^GITHUB_" > envvars
docker exec --env-file envvars -i erlang sh -c "make coveralls"