add streaming http request helpers #757
Workflow file for this run
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: check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| stable-build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - name: ubuntu-latest | |
| path: ubuntu_x86_64_moon_setup | |
| - name: macos-latest | |
| path: mac_m1_moon_setup | |
| runs-on: ${{ matrix.os.name }} | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon check | |
| run: moon check --deny-warn | |
| - name: moon test | |
| run: | | |
| # Run test with --test-failure-json to avoid the output with colors can't be rendered properly in GitHub Actions | |
| moon test --release --test-failure-json | |
| moon test --test-failure-json | |
| moon test --release -C examples --test-failure-json | |
| moon test -C examples --test-failure-json | |
| moon test -C stdio_test --test-failure-json | |
| nightly-build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - name: ubuntu-latest | |
| path: ubuntu_x86_64_moon_setup | |
| - name: macos-latest | |
| path: mac_m1_moon_setup | |
| runs-on: ${{ matrix.os.name }} | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s nightly | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: enable new moon backend | |
| run: | | |
| export MOON_UNSTABLE=rupes_recta | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon check | |
| run: | | |
| moon check | |
| moon check -C examples | |
| - name: moon test | |
| run: | | |
| # Run test with --test-failure-json to avoid the output with colors can't be rendered properly in GitHub Actions | |
| moon test --release --test-failure-json | |
| moon test --test-failure-json | |
| moon test --release -C examples --test-failure-json | |
| moon test -C examples --test-failure-json | |
| moon test -C stdio_test --test-failure-json | |
| moon-format: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: format diff | |
| run: | | |
| moon fmt | |
| moon fmt -C examples | |
| moon fmt -C stdio_test | |
| git diff --exit-code | |
| moon-info: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon info | |
| run: | | |
| moon info | |
| git diff --exit-code | |
| sanitizer-check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: disable mimalloc | |
| run: | | |
| echo "" >dummy_libmoonbitrun.c | |
| gcc dummy_libmoonbitrun.c -c -o ~/.moon/lib/libmoonbitrun.o | |
| - name: setup sanitizer check | |
| run: | | |
| for f in $(find src -name "moon.pkg.json" -not -wholename "src/internal/*" -print); do | |
| content_except_first_brace=$(cat $f | tail -c +2) | |
| ( | |
| echo -e -n '{\n "link": { "native": { "cc-flags": "-g -fsanitize=address -fno-omit-frame-pointer" }},' | |
| printf "%s\n" "$content_except_first_brace" | |
| ) >$f | |
| done | |
| - name: run test with address sanitizer | |
| run: | | |
| export ASAN_OPTIONS=fast_unwind_on_malloc=0 | |
| moon test | |
| coverage-check: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon test | |
| run: moon test --enable-coverage | |
| - name: coverage report | |
| run: | | |
| moon coverage report -f summary > coverage_summary.txt | |
| # Put the coverage report in the pipline output | |
| cat coverage_summary.txt >> "$GITHUB_STEP_SUMMARY" | |
| # We don't use the official coveralls upload tool because it takes >1min to build itself | |
| moon coverage report \ | |
| -f coveralls \ | |
| -o codecov_report.json \ | |
| --service-name github \ | |
| --service-job-id "$GITHUB_RUN_NUMBER" \ | |
| --service-pull-request "${{ github.event.number }}" \ | |
| --send-to coveralls | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} |