Skip to content

Merge pull request #119 from CrowdStrike/dependabot/github_actions/ac… #70

Merge pull request #119 from CrowdStrike/dependabot/github_actions/ac…

Merge pull request #119 from CrowdStrike/dependabot/github_actions/ac… #70

Workflow file for this run

name: test
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
name: Build Ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo build
run: cargo build
- name: cargo build release
run: cargo build --release
test:
runs-on: ubuntu-latest
name: Test Ubuntu / ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: [stable, beta]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test --locked
run: cargo test --locked --all-features --all-targets
# https://github.com/rust-lang/cargo/issues/6669
- name: cargo test --doc
run: cargo test --locked --all-features --doc | grep 'Missing FALCON_CLIENT_ID environment variable.'
nightly:
name: Rust nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src
- run: |
cargo test --lib --bins --examples --benches
- run: |
# We expect doc example to fail without Falcon Credentials
cargo test --doc | grep 'Missing FALCON_CLIENT_ID environment variable.'
minimal:
runs-on: ubuntu-latest
name: ubuntu / stable / minimal-versions
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: Install nightly for -Zminimal-versions
uses: dtolnay/rust-toolchain@nightly
- name: rustup default stable
run: rustup default stable
- name: cargo update -Zminimal-versions
run: cargo +nightly update -Zminimal-versions
- name: cargo test
run: cargo test --locked --all-features --all-targets
os-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} / stable
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
if: runner.os == 'Windows'
- run: vcpkg install openssl:x64-windows-static-md
if: runner.os == 'Windows'
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo build
run: cargo build
- name: cargo build release
run: cargo build --release
- name: cargo test
run: cargo test --locked --all-features --all-targets