Skip to content

Commit 6943287

Browse files
committed
ci: run lazer aptos tests in CI, add precommit deps
1 parent f33ef01 commit 6943287

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
pull_request:
3+
paths:
4+
- lazer/contracts/aptos/**
5+
push:
6+
branches:
7+
- main
8+
9+
name: Lazer Aptos Contract
10+
11+
jobs:
12+
aptos-tests:
13+
name: Aptos tests
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: lazer/contracts/aptos/
18+
steps:
19+
- uses: actions/checkout@v3
20+
21+
- name: Download CLI
22+
run: wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v3.1.0/aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip
23+
24+
- name: Unzip CLI
25+
run: unzip aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip
26+
27+
- name: Run tests
28+
run: ./aptos move test

.github/workflows/ci-pre-commit.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
env:
99
PYTHON_VERSION: "3.11"
1010
POETRY_VERSION: "1.4.2"
11-
1211
jobs:
1312
pre-commit:
1413
runs-on: ubuntu-latest
@@ -47,6 +46,15 @@ jobs:
4746
with:
4847
path: ~/.cache/pypoetry
4948
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }}
49+
# Install Aptos CLI for Lazer contract formatting and linting
50+
- name: Download Aptos CLI
51+
run: wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v3.1.0/aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip
52+
- name: Install Aptos CLI
53+
run: |
54+
unzip aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip
55+
sudo mv aptos /usr/local/bin/
56+
chmod +x /usr/local/bin/aptos
57+
aptos update movefmt
5058
- uses: pre-commit/[email protected]
5159
if: ${{ github.event_name == 'pull_request' }}
5260
with:

0 commit comments

Comments
 (0)