Skip to content

Merge pull request #582 from OlufunbiIK/feat/launch-readiness-product… #395

Merge pull request #582 from OlufunbiIK/feat/launch-readiness-product…

Merge pull request #582 from OlufunbiIK/feat/launch-readiness-product… #395

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
pull_request:
env:
RUSTFLAGS: -D warnings
CARGO_INCREMENTAL: 0
LLVM_PROFILE_FILE: target/coverage/cheese-%p-%m.profraw
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32v1-none
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@v2
with:
tool: cargo-tarpaulin
- name: Install Rust wasm target
run: rustup target add wasm32v1-none
- name: cargo test
run: cargo test
- name: Generate coverage report
run: |
mkdir -p target/coverage
cargo tarpaulin \
--workspace \
--out Xml \
--output-dir target/coverage \
--exclude-files "*/tests/*" \
--verbose \
--fail-under 85
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
files: target/coverage/cobertura.xml
flags: rust
name: cheese-contracts
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: wasm build
run: cargo wasm-build
- name: Upload WASM artifacts
uses: actions/upload-artifact@v4
with:
name: wasm-contracts
path: |
contracts/paylink/target/wasm32v1-none/release/paylink.wasm
contracts/cheese_pay/target/wasm32v1-none/release/cheese_pay.wasm
retention-days: 30
backend-migration-safety:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: cheesepay
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d cheesepay"
--health-interval 10s
--health-timeout 5s
--health-retries 5
defaults:
run:
working-directory: backend
env:
DB_HOST: localhost
DB_PORT: 5432
DB_USER: postgres
DB_PASS: postgres
DB_NAME: cheesepay
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: pnpm/action-setup@v4
with:
version: 10.30.2
- name: Install backend dependencies
run: pnpm install --frozen-lockfile
- name: Migration safety check
run: pnpm migration:check
- name: Migration rollback check
run: pnpm migration:rollback:check