WIP: Add support for configmaps #283
Workflow file for this run
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: CI | |
permissions: | |
actions: read | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: {} | |
env: | |
CARGO_TERM_COLOR: always | |
# Pinned toolchain for linting | |
ACTION_LINTS_TOOLCHAIN: 1.64.0 | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install deps | |
run: ./ci/installdeps.sh | |
# xref containers/containers-image-proxy-rs | |
- name: Cache Dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: "tests" | |
- name: Build | |
run: cargo test --no-run | |
- name: Build lib without default features | |
run: cd lib && cargo check --no-default-features | |
- name: Individual checks | |
run: (cd cli && cargo check) && (cd lib && cargo check) | |
- name: Lints | |
run: cargo xtask custom-lints | |
- name: Run tests | |
run: cargo test -- --nocapture --quiet | |
- name: Manpage generation | |
run: mkdir -p target/man && cargo run --features=docgen -- man --directory target/man | |
build: | |
runs-on: ubuntu-latest | |
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install deps | |
run: ./ci/installdeps.sh | |
- name: Cache Dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: "build" | |
- name: Build | |
run: make test-bin-archive | |
- name: Upload binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: bootc.tar.zst | |
path: target/bootc.tar.zst | |
build-minimum-toolchain: | |
name: "Build using MSRV" | |
runs-on: ubuntu-latest | |
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install deps | |
run: ./ci/installdeps.sh | |
- name: Detect crate MSRV | |
shell: bash | |
run: | | |
msrv=$(cargo metadata --format-version 1 --no-deps | \ | |
jq -r '.packages[1].rust_version') | |
echo "Crate MSRV: $msrv" | |
echo "ACTION_MSRV_TOOLCHAIN=$msrv" >> $GITHUB_ENV | |
- name: Remove system Rust toolchain | |
run: dnf remove -y rust cargo | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env['ACTION_MSRV_TOOLCHAIN'] }} | |
- name: Cache Dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: "min" | |
- name: cargo check | |
run: cargo check | |
cargo-deny: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
log-level: warn | |
command: check bans sources licenses | |
linting: | |
name: "Lints, pinned toolchain" | |
runs-on: ubuntu-latest | |
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install deps | |
run: ./ci/installdeps.sh | |
- name: Remove system Rust toolchain | |
run: dnf remove -y rust cargo | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN'] }} | |
components: rustfmt, clippy | |
- name: cargo fmt (check) | |
run: cargo fmt -- --check -l | |
- name: cargo clippy (warnings) | |
run: cargo clippy -- -D warnings | |
privtest: | |
name: "Privileged testing" | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download | |
uses: actions/download-artifact@v2 | |
with: | |
name: bootc.tar.zst | |
- name: Install | |
run: sudo tar -C / -xvf bootc.tar.zst | |
- name: Integration tests | |
run: sudo podman run --rm -ti --privileged -v /run/systemd:/run/systemd -v /:/run/host -v /usr/bin/bootc:/usr/bin/bootc --pid=host quay.io/fedora/fedora-coreos:testing-devel bootc internal-tests run-privileged-integration | |
container-tests: | |
name: "Container testing" | |
needs: build | |
runs-on: ubuntu-latest | |
container: quay.io/fedora/fedora-coreos:testing-devel | |
steps: | |
- name: Download | |
uses: actions/download-artifact@v2 | |
with: | |
name: bootc.tar.zst | |
- name: Install | |
run: sudo tar -C / -xvf bootc.tar.zst | |
- name: Integration tests | |
run: bootc internal-tests run-container-integration |