mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-02 06:08:23 +08:00
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Unit Tests (Rust)
|
|
run-name: Unit Tests (Rust) - ${{ github.run_id }} - @${{ github.actor }}
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
paths:
|
|
- '**.rs'
|
|
- 'Cargo.toml'
|
|
- 'Cargo.lock'
|
|
- 'build.assets/Makefile'
|
|
- 'build.assets/Dockerfile*'
|
|
merge_group:
|
|
paths:
|
|
- '**.rs'
|
|
- 'Cargo.toml'
|
|
- 'Cargo.lock'
|
|
- 'build.assets/Makefile'
|
|
- 'build.assets/Dockerfile*'
|
|
|
|
jobs:
|
|
test:
|
|
name: Unit Tests (Rust)
|
|
if: ${{ !startsWith(github.head_ref, 'dependabot/') }}
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
container:
|
|
image: ghcr.io/gravitational/teleport-buildbox:teleport13
|
|
options: --cap-add=SYS_ADMIN --privileged
|
|
|
|
steps:
|
|
- name: Checkout Teleport
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Rust cargo cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
${{ github.workspace }}/target
|
|
/usr/local/cargo/registry
|
|
/usr/local/cargo/git
|
|
key: ${{ runner.os }}-cargo-${{ github.workflow }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: ${{ runner.os }}-cargo-${{ github.workflow }}-
|
|
|
|
- name: Run tests
|
|
timeout-minutes: 40
|
|
run: make test-rust
|