Skip to content

Commit

Permalink
feat: add rust build & test action
Browse files Browse the repository at this point in the history
  • Loading branch information
kovipu committed Aug 18, 2024
1 parent da21099 commit 63351d5
Show file tree
Hide file tree
Showing 21 changed files with 1,116 additions and 769 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PUBLIC_SOROBAN_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
PUBLIC_SOROBAN_RPC_URL="https://soroban-testnet.stellar.org/"

SOROBAN_ACCOUNT="alice"
SOROBAN_NETWORK="testnet"
21 changes: 21 additions & 0 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Astro: build"

on:
push:
branches:
- "**"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install and build the webapp
uses: withastro/action@v2
with:
node-version: 22.6.0
- name: Check linting & formatting
runs:
- npm run biome:check
- npm run prettier:check
7 changes: 3 additions & 4 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Rust Clippy Check
name: "Rust: Clippy Check"

on:
push:
branches: [main]
pull_request:
branches: [main]
branches:
- "**"

jobs:
clippy:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Rust: Build & test"

on:
push:
branches:
- "**"

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
7 changes: 3 additions & 4 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Rust Format Check
name: "Rust: Format Check"

on:
push:
branches: [main]
pull_request:
branches: [main]
branches:
- "**"

jobs:
rustfmt:
Expand Down
22 changes: 22 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// .prettierrc.mjs
/** @type {import("prettier").Config} */
const config = {
plugins: ['prettier-plugin-astro'],
overrides: [
{
files: '*.astro',
options: {
parser: 'astro',
},
},
],
tabWidth: 2,
useTabs: false,
printWidth: 120,
singleQuote: true,
jsxSingleQuote: false,
bracketSpacing: true,
semi: true
}

export default config;
12 changes: 12 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"formatter": {
"enabled": false
},
"linter": {
"enabled": true
},
"organizeImports": {
"enabled": true
}
}
Loading

0 comments on commit 63351d5

Please sign in to comment.