Skip to content

Add API access method tests #2244

Add API access method tests

Add API access method tests #2244

Workflow file for this run

---
name: Rust - Run Clippy to check lints
on:
pull_request:
paths:
- .github/workflows/clippy.yml
- clippy.toml
- '**/*.rs'
workflow_dispatch:
jobs:
prepare-android:
name: Prepare Android container
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Use custom container image if specified
if: ${{ github.event.inputs.override_container_image != '' }}
run: echo "inner_container_image_android=${{ github.event.inputs.override_container_image }}"
>> $GITHUB_ENV
- name: Use default container image and resolve digest
if: ${{ github.event.inputs.override_container_image == '' }}
run: |
echo "inner_container_image_android=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV
outputs:
container_image_android: ${{ env.inner_container_image_android }}
clippy-check-desktop:
name: Clippy linting, desktop
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout binaries submodule
run: git submodule update --init --depth=1 dist-assets/binaries
- uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: clippy
override: true
- name: Install build dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install libdbus-1-dev
- name: Clippy check
shell: bash
env:
RUSTFLAGS: --deny warnings
run: |
source env.sh
time cargo clippy --locked --all-targets
clippy-check-android:
name: Clippy linting, Android
needs: prepare-android
runs-on: ubuntu-latest
container:
image: ${{ needs.prepare-android.outputs.container_image_android }}
steps:
# Fix for HOME path overridden by GH runners when building in containers, see:
# https://github.com/actions/runner/issues/863
- name: Fix HOME path
run: echo "HOME=/root" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@v3
- name: Clippy check
env:
RUSTFLAGS: --deny warnings
run: |
cargo clippy --locked --target x86_64-linux-android --package mullvad-jni