mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
21 lines
813 B
YAML
21 lines
813 B
YAML
name: No http imports
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
PR_test_build:
|
|
runs-on: puzl-ubuntu-latest
|
|
|
|
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) | (grep -v '^cw_custom_lints/' || 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
|