Bump puma from 6.6.0 to 7.2.1 in /apps/epp_proxy/priv/test_backend_app #101
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Proxy automated tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build image for tests | |
| run: docker build -t proxy-tester -f Dockerfile.test . | |
| - name: Start the container | |
| run: docker run -d --name tester proxy-tester | |
| - name: Integrated Ruby app setup | |
| run: docker exec -d tester bash -l -c "cd apps/epp_proxy/priv/test_backend_app && bundle install && bundle exec rackup" | |
| - name: Compile for tests | |
| run: | | |
| sleep 15 | |
| docker exec -i tester bash -l -c "source /root/.asdf/asdf.sh && rebar3 as test compile" | |
| - name: Run tests | |
| run: | | |
| docker exec -i -e DEBUG=1 tester bash -l -c "source /root/.asdf/asdf.sh && rebar3 as test ct --sys_config config/test.config --readable=false --cover --verbose=true" | |
| - name: Show test coverage | |
| run: docker exec -i tester bash -l -c "source /root/.asdf/asdf.sh && rebar3 as test cover --verbose" | |
| - name: Generate Cobertura report | |
| if: success() | |
| run: | | |
| docker exec -i tester bash -l -c 'source /root/.asdf/asdf.sh && cd /opt/erlang/epp_proxy && \ | |
| mkdir -p _build/test/covertool && \ | |
| (rebar3 as test covertool generate -s || \ | |
| (COVERTOOL_EBIN=$(find _build -type d -path "*/covertool/ebin" | head -1) && \ | |
| test -n "$COVERTOOL_EBIN" && \ | |
| erl -noshell -pa "$COVERTOOL_EBIN" -eval "\ | |
| {ok,_} = cover:start(),\ | |
| ok = cover:import(\"_build/test/cover/ct.coverdata\"),\ | |
| Config = {config, epp_proxy, 0, no_import, \"_build/test/covertool/epp_proxy.covertool.xml\", false, [\"apps/epp_proxy/src\"], [\"_build/test/lib/epp_proxy/ebin\"], no_callback},\ | |
| ok = covertool:generate_report(Config, cover:imported_modules()),\ | |
| halt(0)."))' | |
| - name: Copy coverage report from container | |
| if: success() | |
| run: | | |
| docker cp tester:/opt/erlang/epp_proxy/_build/test/covertool/epp_proxy.covertool.xml ./cov.xml | |
| docker cp tester:/opt/erlang/epp_proxy/_build/test/cover ./coverage || true | |
| - uses: qltysh/qlty-action/coverage@v2 | |
| if: success() | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: cov.xml | |
| format: cobertura | |
| strip-prefix: /opt/erlang/epp_proxy/ | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage | |
| path: | | |
| cov.xml | |
| coverage/ | |
| if-no-files-found: ignore |