Merge pull request #492 from confidential-containers/dependabot/go_mo… #1129
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
name: basic build and unit tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
# shim basic test | |
shim: | |
name: shim basic test | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, ubuntu-24.04] | |
go-version: [1.23.x] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
cache-dependency-path: src/shim/go.sum | |
- name: Run build | |
run: | | |
make binaries | |
working-directory: src/shim | |
- name: Run unit test | |
run: | | |
go test -v ./... | |
working-directory: src/shim | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6 | |
with: | |
version: v1.60.3 | |
args: -v --timeout 5m | |
working-directory: 'src/shim' | |
rust: | |
name: rust basic checks | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-gnu | |
project: | |
- enclave-agent | |
- runtime-boot/init | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@ed2356ad628626a6b3f5be6c3e0255c0454fcdb9 # stable | |
with: | |
toolchain: stable | |
targets: ${{ matrix.target }} | |
components: rustfmt, clippy | |
- run: cargo fmt --check --manifest-path=src/${{ matrix.project }}/Cargo.toml | |
- run: cargo clippy --manifest-path=src/${{ matrix.project }}/Cargo.toml | |
- name: Run Tests | |
if: ${{ matrix.project == 'enclave-agent' }} | |
run: cargo test --features simple --no-default-features --manifest-path=src/${{ matrix.project }}/Cargo.toml |