Skip to content

check for service account existing in validation #719

check for service account existing in validation

check for service account existing in validation #719

Workflow file for this run

---
name: code verification
on: # yamllint disable-line rule:truthy
push:
branches:
- "master"
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
IN_CI: "true"
jobs:
skctl:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Builder
uses: ./.github/actions/setup-builder
- name: Build skctl
run: make skctl
- name: Check version
run: .build/skctl --version
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Builder
uses: ./.github/actions/setup-builder
- name: Build
run: make build
- name: Regenerate CRDs
run: .build/skctl crd > k8s/raw/simkube.io_simulations.yml
- name: Check CRDs are clean
uses: CatChen/check-git-status-action@v1
with:
fail-if-not-clean: true
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Builder
uses: ./.github/actions/setup-builder
- name: rustfmt nightly
run: |
rustup toolchain install nightly-x86_64-unknown-linux-gnu
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install poetry
uses: snok/install-poetry@v1
# tomlq (included with yq) is needed to check the package version in Cargo.toml
- name: Install tomlq
run: pip install yq
- name: Run pre-commit
uses: pre-commit/[email protected]
test:
runs-on: ubuntu-latest
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Builder
uses: ./.github/actions/setup-builder
- name: Install grcov
run: |
curl -LO https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2
tar -xjf grcov-x86_64-unknown-linux-gnu.tar.bz2
mv grcov /usr/local/bin
- name: Add llvm-tools
run: rustup component add llvm-tools-preview
- name: Test
run: make test cover
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: rust-coverage
path: .build/coverage/rust-coverage.lcov
check-coverage:
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Check out repo and build scripts
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download coverage
uses: actions/download-artifact@v4
- name: Check coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}