-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.37 KB
/
check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: check
on:
push:
branches:
- main
pull_request:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install-ubuntu
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
/bin/bash -c "$(curl -fsSL https://cli.moonbitlang.com/ubuntu_x86_64_moon_setup.sh)"
echo "/home/runner/.moon/bin" >> $GITHUB_PATH
- name: install-macos
if: ${{ matrix.os == 'macos-latest' }}
run: |
/bin/bash -c "$(curl -fsSL https://cli.moonbitlang.com/mac_intel_moon_setup.sh)"
echo "/Users/runner/.moon/bin" >> $GITHUB_PATH
- name: install-windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.cn/windows_moon_setup.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: moon version
run: |
moon version --all
moonrun --version
- name: moon check
run: moon check --deny-warn
- name: moon test
run: |
moon test
moon test --target js
- name: format diff
run: |
moon fmt
git diff --exit-code