-
Notifications
You must be signed in to change notification settings - Fork 6
104 lines (87 loc) · 2.72 KB
/
check.yaml
File metadata and controls
104 lines (87 loc) · 2.72 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: check
on:
push:
branches:
- main
pull_request:
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
channel: [latest, nightly]
fail-fast: false
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.channel == 'nightly' }}
steps:
- uses: actions/checkout@v4
- name: install
if: ${{ matrix.os != 'windows-latest' }}
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s ${{ matrix.channel }}
echo "$HOME/.moon/bin" >> $GITHUB_PATH
- name: install on windows
if: ${{ matrix.os == 'windows-latest' }}
env:
MOONBIT_INSTALL_VERSION: ${{ matrix.channel }}
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
- name: moon version
run: |
moon version --all
moonrun --version
- name: install deps
run: |
moon update
moon check --deny-warn
- name: moon check
run: moon check
- name: moon info
run: |
moon info --target all
git diff --exit-code
- name: download testsuite (Unix)
if: ${{ matrix.os != 'windows-latest' }}
run: sh scripts/init.sh
- name: download testsuite (Windows)
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: ./scripts/init.ps1
- name: Setup MSVC
if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Run moon test
run: |
moon test --target all
moon test --release --target all
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
moon-json-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check `moon.*.json` format
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)