[ABW-3712] Allow to hide/unhide resources on Profile #1574
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Testing CI - Runs on each PR and Push | |
name: Test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_TOOLCHAIN: nightly-2024-01-11 | |
RUST_COMPONENTS: "rust-std" | |
SWIFT_CODE_COV_REPORT_PATH: ".build/artifacts/info.lcov" # chosen | |
jobs: | |
# typos | |
check-typos: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- name: Install Rust Toolchain | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
default: true | |
profile: minimal | |
- name: Install typos | |
uses: RDXWorks-actions/cargo-install@main | |
with: | |
crate: typos-cli | |
version: 1.22.7 | |
- name: Check typos | |
run: typos | |
# cargo check | |
check-cargo-check: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- name: Install Rust Toolchain | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
default: true | |
profile: minimal | |
- name: Cargo Check | |
run: cargo check --all | |
# cargo fmt check | |
check-formatting: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- name: Install Rust Toolchain | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
default: true | |
components: rustfmt | |
- name: Check formatting | |
run: cargo fmt --check | |
# clippy | |
check-clippy: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- name: Install Rust Toolchain | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
default: true | |
components: clippy | |
- name: Clippy Check | |
run: cargo clippy --all | |
# Rust unit, doc and integration | |
test-rust: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- name: Install Rust Toolchain | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
default: true | |
- name: Run rust tests | |
run: cargo test | |
# Swift testing on macOS (Apple Silicon) | |
test-swift: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- uses: RDXWorks-actions/setup-xcode@master | |
with: | |
xcode-version: "15.3.0" | |
- name: Install Rust Toolchain for aarch64-apple-darwin | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
target: aarch64-apple-darwin | |
- name: Build for macOS target and run swift test | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
rustup target add aarch64-apple-darwin | |
sh ./scripts/ios/test.sh --build --codecov ${{ env.SWIFT_CODE_COV_REPORT_PATH }} | |
- name: Upload to CodeCov.io | |
uses: RDXWorks-actions/codecov-action@main | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
files: ${{ env.SWIFT_CODE_COV_REPORT_PATH }} | |
name: codecov-swift | |
flags: swift | |
# Kotlin test run on JVM on macOS (Apple Silicon) | |
test-kotlin: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- name: Install Rust Toolchain for aarch64-linux-android | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
components: ${{ env.RUST_COMPONENTS }} | |
target: aarch64-linux-android | |
- name: Install Rust Toolchain for armv7-linux-androideabi | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
components: ${{ env.RUST_COMPONENTS }} | |
target: armv7-linux-androideabi | |
- name: Install Rust Toolchain for aarch64-apple-darwin | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
target: aarch64-apple-darwin | |
- name: Set up JDK 17 | |
uses: RDXWorks-actions/setup-java@v3 | |
with: | |
distribution: "adopt" | |
java-version: "17" | |
- name: Setup Android SDK | |
uses: RDXWorks-actions/setup-android@v2 | |
- name: Install cargo-ndk | |
run: cargo install cargo-ndk | |
- name: Test JVM with coverage | |
run: ./jvm/gradlew -p jvm/sargon-android koverXmlReportDebug | |
- name: Upload to CodeCov.io | |
uses: RDXWorks-actions/codecov-action@main | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
file: ./jvm/sargon-android/build/reports/kover/reportDebug.xml | |
name: codecov-jvm | |
flags: kotlin | |
# Code Coverage uses Tarpaulin and uploads to CodeCov.io | |
code-coverage: | |
runs-on: macos-14-xlarge | |
steps: | |
- uses: RDXWorks-actions/checkout@main | |
- uses: RDXWorks-actions/setup-xcode@master | |
with: | |
# trying to fix https://github.com/rust-lang/rust/issues/113783 | |
xcode-version: "15.3.0" | |
- name: Install Rust Toolchain | |
uses: RDXWorks-actions/toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
default: true | |
- name: Install cargo tarpaulin | |
uses: RDXWorks-actions/cargo-install@main | |
with: | |
crate: cargo-tarpaulin | |
tag: 0.30.0 | |
locked: true | |
- name: Code Coverage - Generate | |
run: cargo tarpaulin | |
- name: Code Coverage - Upload to CodeCov.io | |
uses: RDXWorks-actions/codecov-action@main | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
flags: rust |