Chore: build features #359
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: No http imports | |
on: [pull_request] | |
jobs: | |
PR_test_build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for http package usage | |
if: github.event_name == 'pull_request' | |
run: | | |
GIT_GREP_OUT="$(git grep package:http | (grep .dart: || test $? = 1) | (grep -v proxy_wrapper.dart || test $? = 1) | (grep -v very_insecure_http_do_not_use || test $? = 1) || true)" | |
[[ "x$GIT_GREP_OUT" == "x" ]] && exit 0 | |
echo "$GIT_GREP_OUT" | |
echo "There are .dart files which use http imports" | |
echo "Using http package breaks proxy integration" | |
echo "Please use ProxyWrapper.getHttpClient() from package:cw_core/utils/proxy_wrapper.dart" | |
exit 1 | |