|
1 | 1 | name: Move Build & Test (Aptos) |
2 | | -on: [push, pull_request] |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "main" ] |
| 6 | + pull_request: |
| 7 | + branches: [ "main" ] |
3 | 8 |
|
4 | 9 | jobs: |
5 | | - move: |
| 10 | + build-test: |
6 | 11 | runs-on: ubuntu-latest |
7 | | - steps: |
8 | | - - uses: actions/checkout@v4 |
9 | 12 |
|
10 | | - - name: Install deps |
11 | | - run: | |
12 | | - sudo apt-get update && sudo apt-get install -y curl python3 |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v4 |
13 | 16 |
|
14 | 17 | - name: Install Aptos CLI |
15 | 18 | run: | |
16 | | - curl -fsSL https://aptos.dev/scripts/install_cli.py | python3 |
17 | | - which aptos || true |
18 | | - aptos --version || true |
19 | | -
|
20 | | - - name: Compile MyToken (capture log, don't fail) |
21 | | - run: | |
22 | | - cd mytoken |
23 | | - set -o pipefail |
24 | | - (aptos move compile --save-metadata --bytecode-version 6 2>&1 | tee compile.log) || true |
25 | | -
|
26 | | - - name: Compile Escrow (capture log, don't fail) |
27 | | - run: | |
28 | | - cd escrow |
29 | | - set -o pipefail |
30 | | - (aptos move compile --save-metadata --bytecode-version 6 2>&1 | tee compile.log) || true |
31 | | -
|
32 | | - - name: Compile SimpleNFT (capture log, don't fail) |
33 | | - run: | |
34 | | - cd simplenft |
35 | | - set -o pipefail |
36 | | - (aptos move compile --save-metadata --bytecode-version 6 2>&1 | tee compile.log) || true |
37 | | -
|
38 | | - - name: Test MyToken (allow failure) |
39 | | - run: | |
40 | | - cd mytoken |
41 | | - (aptos move test 2>&1 | tee test.log) || true |
42 | | -
|
43 | | - - name: Test Escrow (allow failure) |
44 | | - run: | |
45 | | - cd escrow |
46 | | - (aptos move test 2>&1 | tee test.log) || true |
47 | | -
|
48 | | - - name: Test SimpleNFT (allow failure) |
49 | | - run: | |
50 | | - cd simplenft |
51 | | - (aptos move test 2>&1 | tee test.log) || true |
| 19 | + curl -sSL "https://aptos.dev/scripts/install_cli.py" | python3 |
| 20 | + echo "$HOME/.local/bin" >> $GITHUB_PATH |
| 21 | + aptos --version |
52 | 22 |
|
53 | | - - name: Upload logs as artifact |
54 | | - if: always() |
55 | | - uses: actions/upload-artifact@v4 |
56 | | - with: |
57 | | - name: move-logs |
58 | | - path: | |
59 | | - mytoken/compile.log |
60 | | - mytoken/test.log |
61 | | - escrow/compile.log |
62 | | - escrow/test.log |
63 | | - simplenft/compile.log |
64 | | - simplenft/test.log |
65 | | - if-no-files-found: ignore |
| 23 | + - name: Repo-wide build & tests |
| 24 | + run: ./tools/check.sh |
0 commit comments