Skip to content

feat: array sort(quick sort), swap, reverse #272

feat: array sort(quick sort), swap, reverse

feat: array sort(quick sort), swap, reverse #272

Workflow file for this run

name: check
on:
push:
branches:
- main
pull_request:
jobs:
cla-check:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
outputs:
cla-signed: ${{ steps.cla-check-step.outputs.cla-signed }}
steps:
- name: CLA check
id: cla-check-step
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_AUTHOR=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} \
| jq -r '.user.login')
echo "The PR author is $PR_AUTHOR"
CLA_RESPONSE=$(curl -s "https://mooncakes.io/api/v0/cla/check?gh_username=$PR_AUTHOR")
echo "CLA check response: $CLA_RESPONSE"
SIGNED=$(echo $CLA_RESPONSE | jq -r '.signed')
echo "cla-signed=$SIGNED" >> $GITHUB_ENV
echo "If you have any questions about the CLA result, please contact us."
if [ "$SIGNED" != "true" ]; then
echo "CLA is not signed."
exit 1
else
echo "CLA is signed."
fi
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: install
run: |
/bin/bash -c "$(curl -fsSL https://cli.moonbitlang.com/ubuntu_x86_64_moon_setup.sh)"
echo "/home/runner/.moon/bin" >> $GITHUB_PATH
- name: moon check
run: moon check
- name: moon test
run: moon test
- name: moon bundle
run: moon bundle
- name: format diff
run: |
moon fmt
git diff
build-on-mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: install
run: |
/bin/bash -c "$(curl -fsSL https://cli.moonbitlang.com/mac_intel_moon_setup.sh)"
echo "$HOME/.moon/bin" >> $GITHUB_PATH
- name: moon check
run: moon check
- name: moon test
run: moon test
- name: moon bundle
run: moon bundle
- name: format diff
run: |
moon fmt
git diff
typo-check:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
FORCE_COLOR: 1
TYPOS_VERSION: v1.19.0
steps:
- name: download typos
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: check typos
run: typos