Skip to content

Commit 4be0728

Browse files
✨ Add a working ecs example on project init (#12)
* ✨ Add a working ecs example on project init * ♻️ Code refactoring * ♻️ Refactor & Bug Fixes * 🐛 Fix --force flag handling * 👷 Add tests for CLI * ✨ Add InitWorld example for js (jest and mocha) * 👷 Update CI * 👷 Add CI * 👷 Update CI * 👷 Change rust toolchain * 👷 Update CI * 👷 Fix CI * 👷 Update CI * 👷 Update CI * 👷 Update CI * 👷 Update CI * 👷 Add build step
1 parent e329b00 commit 4be0728

File tree

6 files changed

+709
-76
lines changed

6 files changed

+709
-76
lines changed

.github/workflows/run-tests.yml

+28-12
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ on:
44
pull_request:
55

66
env:
7-
solana_version: v1.17.0
7+
solana_version: v1.18.0
88
anchor_version: 0.29.0
99

1010
jobs:
1111
install:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

16-
- uses: actions/cache@v3
16+
- uses: actions/cache@v4
1717
name: cache solana cli
1818
id: cache-solana
1919
with:
@@ -22,7 +22,7 @@ jobs:
2222
~/.local/share/solana/
2323
key: solana-${{ runner.os }}-v0000-${{ env.solana_version }}
2424

25-
- uses: actions/setup-node@v3
25+
- uses: actions/setup-node@v4
2626
with:
2727
node-version: 20
2828

@@ -42,7 +42,8 @@ jobs:
4242
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
4343
yarn --frozen-lockfile --network-concurrency 2
4444
45-
- uses: dtolnay/rust-toolchain@stable
45+
- name: install rust
46+
uses: dtolnay/rust-toolchain@stable
4647
with:
4748
toolchain: stable
4849

@@ -61,7 +62,7 @@ jobs:
6162
runs-on: ubuntu-latest
6263

6364
steps:
64-
- uses: actions/checkout@v3
65+
- uses: actions/checkout@v4
6566
- name: Cache rust
6667
uses: Swatinem/rust-cache@v2
6768
- name: Run fmt
@@ -73,14 +74,14 @@ jobs:
7374
needs: install
7475
runs-on: ubuntu-latest
7576
steps:
76-
- uses: actions/checkout@v3
77+
- uses: actions/checkout@v4
7778
- name: Use Node ${{ matrix.node }}
78-
uses: actions/setup-node@v3
79+
uses: actions/setup-node@v4
7980
with:
8081
node-version: 20
8182

8283
- name: Cache node dependencies
83-
uses: actions/cache@v3
84+
uses: actions/cache@v4
8485
with:
8586
path: '**/node_modules'
8687
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
@@ -93,10 +94,18 @@ jobs:
9394
runs-on: ubuntu-latest
9495

9596
steps:
96-
- uses: actions/checkout@v3
97+
- name: install rust
98+
uses: dtolnay/rust-toolchain@stable
99+
with:
100+
toolchain: stable
101+
102+
- name: Cache rust
103+
uses: Swatinem/rust-cache@v2
104+
105+
- uses: actions/checkout@v4
97106

98107
- name: Use Node ${{ matrix.node }}
99-
uses: actions/setup-node@v3
108+
uses: actions/setup-node@v4
100109
with:
101110
node-version: 20
102111

@@ -110,7 +119,7 @@ jobs:
110119
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
111120
yarn --frozen-lockfile
112121
113-
- uses: actions/cache@v3
122+
- uses: actions/cache@v4
114123
name: cache solana cli
115124
id: cache-solana
116125
with:
@@ -144,6 +153,13 @@ jobs:
144153
npm i -g @coral-xyz/anchor-cli@${{ env.anchor_version }} ts-mocha typescript
145154
anchor test
146155
156+
- name: Install the Bolt CLI and create & build a new project
157+
run: |
158+
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH"
159+
cargo install --path cli --force --locked
160+
bolt init test-project --force
161+
cd test-project && bolt build
162+
147163
- uses: actions/upload-artifact@v3
148164
if: always()
149165
with:

Cargo.lock

+42-38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ path = "src/bin/main.rs"
1616
dev = []
1717

1818
[dependencies]
19-
anchor-cli = { git = "https://github.com/coral-xyz/anchor.git", rev = "v0.29.0" }
19+
anchor-cli = { git = "https://github.com/coral-xyz/anchor.git" }
20+
anchor-client = { git = "https://github.com/coral-xyz/anchor.git" }
2021
anyhow = "1.0.32"
2122
heck = "0.4.0"
2223
clap = { version = "4.2.4", features = ["derive"] }
24+
syn = { version = "1.0.60", features = ["full", "extra-traits"] }

0 commit comments

Comments
 (0)