Skip to content

test(json): adversarial QuickCheck roundtrip and parser-robustness tests #6076

test(json): adversarial QuickCheck roundtrip and parser-robustness tests

test(json): adversarial QuickCheck roundtrip and parser-robustness tests #6076

Workflow file for this run

name: misc-check
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
misc-check:
continue-on-error: true
runs-on: ubuntu-latest
env:
HAWKEYE_VERSION: v5.8.1
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check `moon.*.json` format
timeout-minutes: 10
shell: bash
run: |
_passed=0;
for f in $(find . -type f -name "moon.*.json"); do
if ! jq '.' $f > /dev/null; then
echo $f;
_passed=1;
fi
done
(exit $_passed)
# The action is too slow. See https://github.com/korandoru/hawkeye/issues/189
- name: Download HawkEye
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/korandoru/hawkeye/releases/download/$HAWKEYE_VERSION/hawkeye-installer.sh | sh
- name: Check License Header
timeout-minutes: 10
run: |
hawkeye check
- name: check typos
timeout-minutes: 10
uses: crate-ci/typos@v1
- name: install moonbit
uses: ./.github/actions/setup
- name: moon test
timeout-minutes: 10
run: moon test --enable-coverage
- name: coverage report
run: |
moon coverage report -f summary > coverage_summary.txt
# Put the coverage report in the pipeline 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 }}