Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split CI into several jobs #129

Merged
merged 3 commits into from
Oct 16, 2024
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
47 changes: 35 additions & 12 deletions .github/workflows/rust.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: CI

on:
push:
Expand All @@ -10,39 +10,62 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
lint:
name: 🔍 Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Build
- name: Build
run: cargo build --verbose

# Install tooling
- name: Install clang-format
run: sudo apt-get install -y clang-format

- name: Install yarn
run: cargo xtask bootstrap yarn

# Lint
- name: Check Typescript format
run: cargo xtask fmt --check typescript

- name: Check Rust format
run: cargo xtask fmt --check rust

# Unit tests
build:
name: 🏗️ Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build
run: cargo build --verbose

unit-tests:
name: 🧪 Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run tests
run: cargo test --verbose

# Integration tests
integration-tests-generation:
name: 🧩 Integration tests (generation)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install tooling for building C++
run: sudo apt-get install -y cmake ninja-build

- name: Installing hermes and test-runner
run: cargo xtask bootstrap

- name: Run tests of generated bindings
run: ./scripts/run-tests.sh

integration-tests-checkout:
name: 🧩 Integration tests (checkout)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Run tests for checkout command
run: ./scripts/run-checkout-tests.sh

- name: Done
run: echo "Success!"
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![CI](https://github.com/jhugman/uniffi-bindgen-react-native/actions/workflows/ci.yml/badge.svg)](https://github.com/jhugman/uniffi-bindgen-react-native/actions/workflows/ci.yml)

# uniffi-bindgen-react-native
[UniFFI](https://mozilla.github.io/uniffi-rs/latest/) is a multi-language bindings generator for Rust.

Expand Down