Skip to content

Commit fa756f3

Browse files
committed
feat: add rust build & test action, switch to prettier formatting
1 parent da21099 commit fa756f3

21 files changed

+1123
-769
lines changed

.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
PUBLIC_SOROBAN_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
2+
PUBLIC_SOROBAN_RPC_URL="https://soroban-testnet.stellar.org/"
3+
4+
SOROBAN_ACCOUNT="alice"
5+
SOROBAN_NETWORK="testnet"

.github/workflows/clippy.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: Rust Clippy Check
1+
name: "Rust: Clippy Check"
22

33
on:
44
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
5+
branches:
6+
- "**"
87

98
jobs:
109
clippy:

.github/workflows/nodejs.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: NodeJS
2+
3+
on:
4+
push:
5+
branches: ['**']
6+
7+
jobs:
8+
9+
complete:
10+
if: always()
11+
needs: [build-and-test]
12+
runs-on: ubuntu-latest
13+
steps:
14+
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
15+
run: exit 1
16+
17+
build-and-test:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- uses: actions/setup-node@v3
22+
with:
23+
node-version: 22.6.0
24+
cache: 'npm'
25+
- run: npm ci
26+
- run: npm run prettier:check
27+
- run: npm run biome:check

.github/workflows/rust.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Rust: Build & test"
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Build
18+
run: cargo build --verbose
19+
- name: Run tests
20+
run: cargo test --verbose

.github/workflows/rustfmt.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: Rust Format Check
1+
name: "Rust: Format Check"
22

33
on:
44
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
5+
branches:
6+
- "**"
87

98
jobs:
109
rustfmt:

.prettierrc.mjs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// .prettierrc.mjs
2+
/** @type {import("prettier").Config} */
3+
const config = {
4+
plugins: ['prettier-plugin-astro'],
5+
overrides: [
6+
{
7+
files: '*.astro',
8+
options: {
9+
parser: 'astro',
10+
},
11+
},
12+
],
13+
tabWidth: 2,
14+
useTabs: false,
15+
printWidth: 120,
16+
singleQuote: true,
17+
jsxSingleQuote: false,
18+
bracketSpacing: true,
19+
semi: true
20+
}
21+
22+
export default config;

biome.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3+
"formatter": {
4+
"enabled": false
5+
},
6+
"linter": {
7+
"enabled": true
8+
},
9+
"organizeImports": {
10+
"enabled": true
11+
}
12+
}

0 commit comments

Comments
 (0)