Repository navigation
78 lines (63 loc) · 2.07 KB
/
Copy pathcli-bundle.yml
File metadata and controls
78 lines (63 loc) · 2.07 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
name: CLI bundle
on:
push:
branches:
- main
- master
- v3
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
timeout-minutes: 30
strategy:
matrix:
node-version: [22, 24]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}, node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: 1.2.17
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install npm dependencies
run: cd cli && npm i
- name: Prepare
run: cd cli && npm run prepare
- name: Bundle
run: cd cli && npm run bundle
- name: Check local bundle
run: node ./cli/bundle/cli.js -v
- name: Install bundle globally
run: npm i -g ./cli/bundle/cli.tgz
- name: Check global bundle
run: mops -v
- name: Check formatting with mo-fmt
run: mops format --check
# The bundle ships the deprecated Prettier plugin's wasm, which mops format falls back to without a mo-fmt pin.
- name: Format with the bundled Prettier plugin
working-directory: ${{ runner.temp }}
run: |
printf '[dependencies]\n' > mops.toml
printf 'module {\npublic func f():Nat{1};\n}\n' > A.mo
if mops format --check; then echo "A.mo should need formatting"; exit 1; fi
mops format 2>&1 | tee output.txt
grep -q "deprecated" output.txt
mops format --check
ci-ok-cli:
timeout-minutes: 5
if: always()
needs: [build]
runs-on: ubuntu-latest
steps:
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1