Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nftopia-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:

- name: Upload build artifact
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nftopia-backend-dist
path: nftopia-backend/dist/
2 changes: 1 addition & 1 deletion .github/workflows/nftopia-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

- name: Upload build artifact
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nftopia-frontend-build
path: nftopia-frontend/.next/
89 changes: 47 additions & 42 deletions .github/workflows/nftopia-stellar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,57 +13,62 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_VERSION: '1.75'

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rust (nightly)
uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown
components: clippy, rustfmt

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown
- name: Verify Rust version
run: |
rustc --version
cargo --version

- name: Cache cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('nftopia-stellar/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('nftopia-stellar/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Build contract
run: |
cd nftopia-stellar
cargo build --target wasm32-unknown-unknown --release
echo "Contract size: $(stat -f%z target/wasm32-unknown-unknown/release/*.wasm) bytes"
- name: Build contracts (wasm)
run: |
cd nftopia-stellar
cargo build --target wasm32-unknown-unknown --release
echo "Contract size:"
ls -lh target/wasm32-unknown-unknown/release/*.wasm

- name: Run tests
run: |
cd nftopia-stellar
cargo test --verbose
- name: Run tests
run: |
cd nftopia-stellar
cargo test --verbose

- name: Run clippy (linting)
run: |
cd nftopia-stellar
cargo clippy --all-targets --all-features -- -D warnings
- name: Run clippy (linting)
run: |
cd nftopia-stellar
cargo clippy --all-targets --all-features -- -D warnings

- name: Check formatting
run: |
cd nftopia-stellar
cargo fmt -- --check
- name: Check formatting
run: |
cd nftopia-stellar
cargo fmt -- --check

- name: Upload contract artifact
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: nftopia-stellar-contract
path: nftopia-stellar/target/wasm32-unknown-unknown/release/*.wasm
- name: Upload contract artifact
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: nftopia-stellar-contract
path: nftopia-stellar/target/wasm32-unknown-unknown/release/*.wasm
Loading
Loading